-
Notifications
You must be signed in to change notification settings - Fork 759
Closed
Labels
css-values-4Current WorkCurrent Work
Description
Maybe returning a result in its canonical unit should not be mandatory?
- If
rootis an operator node that’s not one of the calc-operator nodes, and all of its calculation children are numeric values with enough information to compute the operation root represents, return the result of runningroot’s operation using its children, expressed in the result’s canonical unit.
https://drafts.csswg.org/css-values-4/#simplify-a-calculation-tree
It prevents simplifying min(1em) as calc(1em) (related: #9559), clamp(0em, 2em, 1em) as calc(1em), round(1.1em, 1em) as calc(1em), etc.
Chrome/FF currently simplify min(max(1%, -1%)) as max(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.
Metadata
Metadata
Assignees
Labels
css-values-4Current WorkCurrent Work