-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add tests for CSS round()
with one argument
#2037
Conversation
This also updates tests expect global function warnings when calculations are falling back on global Sass functions. See sass/sass#3803 Closes #2036
|
||
, | ||
1 | a {b: abs(1 + 1px)} | ||
| ^^^^^^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Shouldn't these point to the function name instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the deprecation warning specifically refers to mixing unitless and unit numbers, I think it makes sense to point to the specific location where that mixing occurs.
' | ||
input.scss 1:13 root stylesheet | ||
|
||
DEPRECATION WARNING: In future versions of Sass, round() will be interpreted as a CSS round() calculation. This requires an explicit modulus when rounding numbers with units. If you want to use the Sass function, call math.round() instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a double warning expected here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More or less. It's both the case that round(1 + 1px)
will throw an error and that round(2px)
(which it resolves to) will throw an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
This also updates tests expect global function warnings when
calculations are falling back on global Sass functions.
See sass/sass#3803
Closes #2036
[skip dart-sass]