-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-color-4] lch() and lab() should use a % for their L argument, not a number #4477
Comments
I'm somewhat reluctantly (because I value consistency with existing use in the wild, which never uses a %) concluding that for CSS, a % will be how we go. Also, for the collision/disambiguation aspect (if it is optional, does 50% mean 50 or 0.5) that percent needs to be mandatory, not optional. I'm okay with making the change, and seeing what feedback we get on it. |
We have several relevant precedents:
I see no reason, why For At least for
This would also make it possible to use the alternate HLC order of components (like HSL). This is impossible when using
By the way:
|
(Migrated this sub-issue from #278.)
In lch() and lab(), the L (lightness) argument normally ranges from 0 to 100, similar to hsl()'s L argument going from 0% to 100%. It can go above 100, 100 still represents "full white" with no hint of the hue color; higher values just indicate brighter, more luminous whites. (Wikipedia even defines the L argument as being 0-100, with no mention of higher values!)
We should be consistent in our usage here, and make L just a
<percentage>
in these two functions, like they are in hsl().(a/b/c are all much more arbitrary values with no theoretical max, so keeping them as an arbitrarily-defined number rather than a percentage makes more sense.)
@svgeesus Thoughts? This would prevent the collision of number/percentage meaning that you were concerned about in #3450, too. ^_^
The text was updated successfully, but these errors were encountered: