-
Notifications
You must be signed in to change notification settings - Fork 715
[css-color-5] Consider moving colorspace parameter in color-adjust() to beginning to match color-mix() and ease parsing #6053
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
Comments
How about moving the "colorspace" in color-mix to the end? And also, not calling it colorspace as in most cases it is not a different colorspace and is only a different color notation? |
Moving colorspace to the end of color-mix() would make parsing quite a bit more inefficient as you would not know which adjusters were valid as you were parsing them. If adjusters are going to be validated based on colorspace, I think it makes sense for it to come first. |
We actually made some changes to the color space argument, mandating an |
The current spec (or what I get when I load https://drafts.csswg.org/css-color-5/#coloradjust anyway) has the following grammar now:
Which seems to still have adjusters (though it is no longer defined what a color-adjuster production is). |
Whoops, I completely missed that this was about Edit: done |
Closed by WG resolution to drop |
In the current CSS Color 5 draft's color-adjust() function, https://drafts.csswg.org/css-color-5/#coloradjust, the colorspace is argument is last, which is inconsistent with color-mix(), where it is first, and makes parsing a bit more complicated since we don't know which adjusters are allowed until after we have parsed them.
Please consider moving the colorspace to the beginning, changing the grammar from:
to
The text was updated successfully, but these errors were encountered: