Document clamp() as a special function (#513)

Closes #505
See sass/sass#2860
This commit is contained in:
Natalie Weizenbaum 2020-12-29 17:02:30 -08:00 committed by GitHub
parent b7aa7b4c52
commit 935251b499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,13 +84,22 @@ calls][]—it's parsed as a normal [plain CSS function call][].
font-weight: 400 font-weight: 400
<% end %> <% end %>
## `calc()`, `element()`, `progid:...()`, and `expression()` ## `calc()`, `clamp()`, `element()`, `progid:...()`, and `expression()`
The [`calc()`][] and [`element()`][] functions are defined in the CSS spec. <% impl_status dart: "1.31.0", libsass: false, ruby: false, feature: "clamp()" do %>
Because `calc()`'s mathematical expressions conflict with Sass's arithmetic, and LibSass, Ruby Sass, and older versions of Dart Sass treat `clamp()` as a
`element()`'s IDs could be parsed as colors, they need special parsing. [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 [`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 [`element()`]: https://developer.mozilla.org/en-US/docs/Web/CSS/element
[`expression()`][] and functions beginning with [`progid:`][] are legacy [`expression()`][] and functions beginning with [`progid:`][] are legacy