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-images-3] remove && from <linear-color-stop> syntax #8021

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

12Me21
Copy link
Contributor

@12Me21 12Me21 commented Nov 5, 2022

c03b2ea changed <color-stop> = <color> <length-percentage>? to <linear-color-stop> = <color> && <length-percentage>?
I believe the && was a mistake, since <length-percentage> <color> doesn't seem to be valid?

Note: This also affects [css-images-4], which uses the same definition.

@fantasai fantasai added the css-images-3 Current Work label Nov 7, 2022
@svgeesus
Copy link
Contributor

svgeesus commented Jul 1, 2023

@tabatkins could you review, and confirm && was a mistake?

@SebastianZ
Copy link
Contributor

For what it's worth, this syntax was introduced many years ago in 7bb4fba?diff=unified#diff-f80d8fc0ac03564f1ec01e8503aeb5bea39694d9b20764727225b00510671de3R2249, initially restricted to <cap-linear-color-stop>. Later on it was relaxed to apply to any <linear-color-stop> in 321c3e5#diff-6558f7be1858e8498722b9ac5981271f70d5219829f557f54fa720cf443c3e5bR1681.

Sebastian

@cdoublev
Copy link
Collaborator

cdoublev commented Jul 3, 2023

Also for what it is worth, Chrome and FF do not parse position(s) before the color as valid, and if it should be allowed, it may be odd to be able to specify both positions before or after the color, but not a color between them.

@tabatkins
Copy link
Member

Yeah, reviewing the diff I'm almost certain it was just a mistake while writing it - it looked reasonable to use an && in the grammar while I was rewriting. I still think it's probably reasonable to do so, but nobody's followed that in forever and it's not very important, so reverting to the old spec text which matches impls makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-images-3 Current Work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants