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-properties-values-api] initial-value for * with arbitrary substitution values #1120

Open
cdoublev opened this issue Jan 29, 2024 · 1 comment

Comments

@cdoublev
Copy link

If I understand the spec correctly, initial-value does not require to be validated when syntax is *.

But in Chrome, given the CSS rules below:

  • the first rule is valid: initial-value: var(1) is discarded
  • the second rule is invalid
@property --p1 {
  inherits: false;
  syntax: "*";
  initial-value: green;
  initial-value: var(1);
}
@property --p2 {
  inherits: false;
  syntax: "*";
  initial-value: green;
  initial-value: var(--initial);
}

I am completely confused by the parse result in Chrome. Anyway, should initial-value be invalid when it includes an arbitrary substitution value?

@tabatkins
Copy link
Member

Hm, the spec is indeed unclear here. I prefer Chrome's behavior - validating the initial-value as normal for an untyped custom property. The spec just needs its conditions to be slightly rephrased to match.

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

No branches or pull requests

2 participants