[css-color] HSL & HWB syntax should allow numbers as well as percentage.
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox122 | --- | fixed |
People
(Reporter: tlouw, Assigned: tlouw)
References
Details
Attachments
(2 files)
According to:
https://drafts.csswg.org/css-color-4/#the-hwb-notation
the HWB syntax allows percentages and numbers for the whiteness and blackness components:
hwb() = hwb(
[<hue> | none]
[<percentage> | <number> | none]
[<percentage> | <number> | none]
[ / [<alpha-value> | none] ]? )
Currently we only parse percentages for those components.
hwb(20deg 50 40) should be a valid hwb value. The color-valid-hwb.html wpt test doesn't test for these values either.
According to:
https://drafts.csswg.org/css-color-4/#the-hsl-notation
the modern HSL syntax allows percentages and numbers for the saturation and lightness components:
<modern-hsl-syntax> = hsl(
[<hue> | none]
[<percentage> | <number> | none]
[<percentage> | <number> | none]
[ / [<alpha-value> | none] ]? )
Currently we only parse percentages for the modern syntax.
hsl(20deg 50 40)
should be a valid hsl value. The color-valid-hsl.html
wpt test doesn't test for these values either.
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Comment 1•11 months ago
|
||
Updated•11 months ago
|
Updated•11 months ago
|
Assignee | ||
Comment 2•11 months ago
|
||
The second and third components for HSL and HWB are stored as
percentages in the range [0..1], but as part of the change to allow
numbers for those two components as well as percentages, they act like
all the other <number-or-percentage> components. This means the values
are store in their number value. For HSL and HWB they both match with
the percentage values and are in the range [0..100].
https://drafts.csswg.org/css-color-4/#the-hsl-notation
https://drafts.csswg.org/css-color-4/#the-hwb-notation
Change to the accepted types for the components are discussed here:
https://github.com/w3c/csswg-drafts/issues/8322
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Assignee | ||
Updated•11 months ago
|
Comment 7•10 months ago
|
||
bugherder |
Comment 8•10 months ago
|
||
bugherder |
Description
•