Skip to content

Commit

Permalink
Bug 1867151 [wpt PR 43399] - Allow non-percentages for hsl and hwb, a…
Browse files Browse the repository at this point in the history
…=testonly

Automatic update from web-platform-tests
Allow non-percentages for hsl and hwb

HSL and HWB have comma-less, "non-legacy" formats now with
css-color-4. In these formats saturation, lightness, whiteness and
blackness no longer need to be in percentages, but instead can be
bare numbers which get divided by 100 to represent percentages.

https://drafts.csswg.org/css-color-4/#typedef-modern-hsl-syntax
"""
The next two arguments are the saturation and lightness, respectively. For saturation, 100% or 100 is a fully-saturated, bright color, and 0% or 0 is a fully-unsaturated gray. For lightness, 50% or 50 represents the "normal" color, while 100% or 100 is white and 0% or 0 is black.
"""

Some colors that were assumed to be "invalid" for relative color use
bare numbers for hsl/hwb and thus are no longer invalid.

Bug: 1505787
Change-Id: Ie7fec239d0422da54a3d8ee0e46e64b1bee73fe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5067499
Reviewed-by: Rune Lillesveen <futharkchromium.org>
Commit-Queue: Aaron Krajeski <aaronhkchromium.org>
Cr-Commit-Position: refs/heads/main{#1231332}

--

wpt-commits: 0caf8c7c022b9d495196188ff1c6a493ff55ecdf
wpt-pr: 43399

UltraBlame original commit: 2b473eb31c3f55e2f14f02472ff83bab7c4d2b77
  • Loading branch information
marco-c committed Dec 7, 2023
1 parent c10f7a6 commit bb6a27d
Showing 1 changed file with 0 additions and 152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,34 +464,6 @@
(
from
rebeccapurple
h
10
%
10
)
)
;
test_invalid_value
(
color
hsl
(
from
rebeccapurple
h
10
10
%
)
)
;
test_invalid_value
(
color
hsl
(
from
rebeccapurple
10
%
s
Expand All @@ -516,54 +488,6 @@
40
%
)
h
10
%
10
)
)
;
test_invalid_value
(
color
hsl
(
from
rgb
(
10
%
20
%
30
%
40
%
)
h
10
10
%
)
)
;
test_invalid_value
(
color
hsl
(
from
rgb
(
10
%
20
%
30
%
40
%
)
10
%
s
Expand Down Expand Up @@ -696,34 +620,6 @@
(
from
rebeccapurple
h
10
%
10
)
)
;
test_invalid_value
(
color
hwb
(
from
rebeccapurple
h
10
10
%
)
)
;
test_invalid_value
(
color
hwb
(
from
rebeccapurple
10
%
w
Expand All @@ -748,54 +644,6 @@
40
%
)
h
10
%
10
)
)
;
test_invalid_value
(
color
hwb
(
from
rgb
(
10
%
20
%
30
%
40
%
)
h
10
10
%
)
)
;
test_invalid_value
(
color
hwb
(
from
rgb
(
10
%
20
%
30
%
40
%
)
10
%
w
Expand Down

0 comments on commit bb6a27d

Please sign in to comment.