-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Support constants in calc() #3258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this enhancement is a kind of dup of #2954 (I was looking for general purpose constants but found yours and the suggested dup instead) |
They're different—#2954 would add support for |
According to https://developer.mozilla.org/en-US/docs/Web/CSS/calc-constant#browser_compatibility, all of these constants are now supported by Firefox (although interestingly it seems none are supported in Chrome). |
The proposal has landed. Since it's relatively unlikely to be controversial, I'll give it two weeks for public comment before declaring it implementable. |
Uh oh!
There was an error while loading. Please reload this page.
Values and Units 4 defines
pi
,e
,infinity
,-infinity
, andNaN
constants for use incalc()
expressions. We should support these as they land in browsers. The current status (as of 8 February 2022) is:infinity
: landing in Chrome 99-infinity
: landing in Chrome 99NaN
: landing in Chrome 99pi
: unsupported anywhere as far as I can telle
: unsupported anywhere as far as I can tellFor the degenerate constants (
infinity
,-infinity
, andNaN
) we should not only support parsing them incalc()
expressions but also serializing Sass numbers with those values tocalc()
expressions.The text was updated successfully, but these errors were encountered: