[css-properties-values-api] Compute initial value
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox121 | --- | fixed |
People
(Reporter: zrhoffman, Assigned: zrhoffman)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Now that registered custom properties are computed, the initial value can also be computed.
Tests that should pass: https://wpt.fyi/results/css/css-properties-values-api/registered-property-initial.html
In order to use computed <length>
and <length-percentage>
values before bug 1856524 is resolved, a new generic computed value type would need to be added, like ComputedValueComponent
added in bug 1857716, which uses computed::Length
and computed::LengthPercentage
instead of specified::Length
and specified::LengthPercentage
like ComputedValueComponent
does until bug 1856524 is resolved.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
This will probably require passing a computed::Context
all the way to PropertyRegistration::validate_initial_value
, similar to the Stylist passing in bug 1840478 and bug 1850370.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
This patch computes initial value when initial values are collected. The
initial value cannot be computed earlier (for example, at parse time)
without breaking intended behavior, since CSSOM expects the initial
value string of a CSSPropertyRule to remain uncomputed.
Although <length> and <length-percentage> can be accurately computed
already for initial values since valid initial values are always
font-indepent, this patch leaves <length> and <length-percentage>
uncomputed for simplicity (until bug 1856524 is implemented).
Updated•1 year ago
|
Comment 4•1 year ago
|
||
bugherder |
Description
•