[css-properties-values-api] Use canonical units for custom properties with font-independent values
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox120 | --- | fixed |
People
(Reporter: zrhoffman, Assigned: zrhoffman)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
For "<length>", "<length-percentage>", "<angle>", "<time>", "<resolution>", "<integer>", "<number>", and "<percentage>" values:
If the specified value is a dimension literal (such as 50em or .2s), the computed value is the same value, but with the unit converted to the corresponding canonical unit for the type of value.
If the specified value is any other numeric literal (such as 5 or 20%), the computed value is as specified. (In particular, percentages are never resolved against anything.)
If the specified value is a function that evaluates to one of those types (such as a math function), the computed value is defined by that function.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Other than making some computed <color> WPTs pass, this mostly does not
change behavior.
Depends on D190252
Assignee | ||
Comment 3•1 year ago
|
||
We resolve calc expressions and use appropriate units by computing
ToComputedValue trait, computing each component's value, then converting
it back to that component's type, before making a new VariableValue from
the computed value's CSS string to store in the computed properties map.
Depends on D190253
Comment 6•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2df3706fe5c0
https://hg.mozilla.org/mozilla-central/rev/2609670e6e11
Description
•