mirror of
https://github.com/danog/sass-site.git
synced 2024-11-27 12:35:03 +01:00
Document clamp() as a special function (#513)
Closes #505 See sass/sass#2860
This commit is contained in:
parent
b7aa7b4c52
commit
935251b499
@ -84,13 +84,22 @@ calls][]—it's parsed as a normal [plain CSS function call][].
|
||||
font-weight: 400
|
||||
<% end %>
|
||||
|
||||
## `calc()`, `element()`, `progid:...()`, and `expression()`
|
||||
## `calc()`, `clamp()`, `element()`, `progid:...()`, and `expression()`
|
||||
|
||||
The [`calc()`][] and [`element()`][] functions are defined in the CSS spec.
|
||||
Because `calc()`'s mathematical expressions conflict with Sass's arithmetic, and
|
||||
`element()`'s IDs could be parsed as colors, they need special parsing.
|
||||
<% impl_status dart: "1.31.0", libsass: false, ruby: false, feature: "clamp()" do %>
|
||||
LibSass, Ruby Sass, and older versions of Dart Sass treat `clamp()` as a
|
||||
[plain CSS function] rather than supporting special syntax within it.
|
||||
|
||||
[plain CSS function]: ../at-rules/function#plain-css-functions
|
||||
<% end %>
|
||||
|
||||
The [`calc()`], [`clamp()`] and [`element()`] functions are defined in the CSS
|
||||
spec. Because `calc()`'s mathematical expressions conflict with Sass's
|
||||
arithmetic, and `element()`'s IDs could be parsed as colors, they need special
|
||||
parsing.
|
||||
|
||||
[`calc()`]: https://developer.mozilla.org/en-US/docs/Web/CSS/calc
|
||||
[`clamp()`]: https://developer.mozilla.org/en-US/docs/Web/CSS/clamp
|
||||
[`element()`]: https://developer.mozilla.org/en-US/docs/Web/CSS/element
|
||||
|
||||
[`expression()`][] and functions beginning with [`progid:`][] are legacy
|
||||
|
Loading…
Reference in New Issue
Block a user