-
Notifications
You must be signed in to change notification settings - Fork 715
[css-values-4] Allow more simplification of operator nodes #9616
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
In general, I have no particular opinion on how the simplification rules should work, so long as they're consistent and reasonable. I'm happy to match browsers if they're in agreement and the result makes sense.
I'll leave this to #9559.
It doesn't seem particularly useful to me to require this work, versus just waiting until they can actually finish the answer. (And in the clamp case, you can't do that simplification if the arguments are %s.) Are browsers currently doing so?
This looks like it's probably #9559 too. |
Fwiw, I do not understand why the shortest serialization principle exists for specified values. But I have read that implementers prefer to avoid preserving as many of the calculation nodes as possible, probably to save memory (and the UX), I guess.
No. I guess I cannot simplify them when one but not all have a negative value, right. So it seems that everything is already well specified! Sorry. =) |
… animatable As per resolution Closes w3c#9616
Maybe returning a result in its canonical unit should not be mandatory?
https://drafts.csswg.org/css-values-4/#simplify-a-calculation-tree
It prevents simplifying
min(1em)
ascalc(1em)
(related: #9559),clamp(0em, 2em, 1em)
ascalc(1em)
,round(1.1em, 1em)
ascalc(1em)
, etc.Chrome/FF currently simplify
min(max(1%, -1%))
asmax(1%, -1%)
. There does not seem to be any corresponding WPT tests. Support for other math functions is still low so I have not tested them.The text was updated successfully, but these errors were encountered: