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-values-4] Allow omitting <declaration-value> in mix() #8556

Closed
cdoublev opened this issue Mar 10, 2023 · 2 comments
Closed

[css-values-4] Allow omitting <declaration-value> in mix() #8556

cdoublev opened this issue Mar 10, 2023 · 2 comments

Comments

@cdoublev
Copy link
Collaborator

If I am not mistaken, mix() is valid for custom properties, whose initial value is the guaranteed-invalid value, ie. an omitted value.

A mix() notation is invalid if either of its <declaration-value>s are invalid when interpreted as a whole value for the property the function is used in, or if the property using it is not animatable.

Should mix() syntax allow omitting <declaration-value> ...

- <mix()> = mix( <percentage> ';' <declaration-value> ';' <declaration-value> )
+ <mix()> = mix( <percentage> ';' <declaration-value>? ';' <declaration-value>? )

... to accept inputs like --custom: mix(50%; ; on)?

@Loirooriol
Copy link
Contributor

In fact mix(50%; ; on) is using a space so that's already a <declaration-value> I think? Omitting it would allow mix(50%;; on) I guess.

@Loirooriol Loirooriol added the css-values-4 Current Work label Mar 10, 2023
@tabatkins
Copy link
Member

Yes, passing a space does indeed satisfy <declaration-value>, but I should indeed go ahead and give it ? since that's also a valid custom property value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment