Closed Bug 1857255 Opened 1 year ago Closed 1 year ago

[css-properties-values-api] Compute <color>

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1846632

People

(Reporter: fredw, Assigned: fredw)

References

(Blocks 1 open bug)

Details

From https://drafts.css-houdini.org/css-properties-values-api-1/#registered-custom-property:

For "<color>" values, the value is computed by resolving color values.

I'm not sure exactly what it means, but there is a section here in the css-color spec:

https://drafts.csswg.org/css-color-4/#resolving-color-values

In particular I noticed that many WPT tests are currently failing because tests expect "named colors" to be serialized as sRGB color, which seems to be what the spec suggests:

If the sRGB color was explicitly specified by the author as a named color, or as a system color, the specified value is that named or system color, converted to ASCII lowercase. The computed and used value is the corresponding sRGB color, paired with the specified alpha channel (after clamping to [0.0, 1.0]) and defaulting to opaque if unspecified).
Otherwise, the specified, computed and used value is the corresponding sRGB color, paired with the specified alpha channel (after clamping to [0.0, 1.0]) and defaulting to opaque if unspecified).

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1846632
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.