Skip to content
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-5] Should there be a comma between mix-components in color-mix()? #6049

Closed
weinig opened this issue Feb 27, 2021 · 2 comments
Closed

Comments

@weinig
Copy link

weinig commented Feb 27, 2021

In CSS Color 5's color-mix() function, https://drafts.csswg.org/css-color-5/#color-mix, should there be a comma between mix-components? For example, which of the following is correct:

color-mix(lch, red 40%, blue);

or

color-mix(lch, red 40% blue);

The grammar indicates no comma:

color-mix() = color-mix(<colorspace>?, <mix-component>#{2})
<mix-component> = <color> [ <percentage> | <color-adjuster>+ ]?

but all the examples have commas.

I personally think the comma makes it more readable.

@Loirooriol
Copy link
Contributor

But the grammar indicates comma? <mix-component>#{2} has a hash mark which

indicates that the preceding type, word, or group occurs one or more times, separated by comma tokens

@weinig
Copy link
Author

weinig commented Feb 28, 2021

Ah, I missed that. Ok, then that clarifies things. Thanks.

@weinig weinig closed this as completed Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants