Closed Bug 1846632 Opened 2 years ago Closed 1 year ago

[css-properties-values-api] Use canonical units for custom properties with font-independent values

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
120 Branch
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.

Duplicate of this bug: 1853395
Assignee: nobody → zach
Status: NEW → ASSIGNED
Summary: [css-properties-values-api] Use canonical units for computed values → [css-properties-values-api] Use canonical units for custom properties with font-independent values
Blocks: 1856524
Depends on: 1857398

Other than making some computed <color> WPTs pass, this mostly does not
change behavior.

Depends on D190252

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

Duplicate of this bug: 1857255
Blocks: 1857674
Blocks: 1857716
Blocks: 1858305
Pushed by zach@zrhoffman.net: https://hg.mozilla.org/integration/autoland/rev/2df3706fe5c0 [css-properties-values-api] Store ComputedValue ToCss result r=fredw,emilio https://hg.mozilla.org/integration/autoland/rev/2609670e6e11 [css-properties-values-api] Use canonical values for font-independent types r=fredw,emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Blocks: 1858848
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: