Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Commit-Queue: Aaron Krajeski <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231332}
- Loading branch information