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

Bug in rule “validation.css”: “--color” is an unknown vendor extension #1030

Open
svgeesus opened this issue Nov 11, 2020 · 6 comments

Comments

@svgeesus
Copy link
Contributor

No, all properties which start with a double dash "--" are CSS Custom Properties not "vendor extensions". I mean come on, CSS Custom Properties for Cascading Variables Module Level 1 has been in CR since 2015 and is implemented in all browsers.

Again, a poorly-maintained CSS Validator that is half-a decade behind the CSS specifications is adding negative value here.

Found while checking https://www.w3.org/TR/2020/WD-css-color-4-20201112/.

@xfq
Copy link
Member

xfq commented Nov 12, 2020

It seems to be tracked in w3c/css-validator#111

@svgeesus
Copy link
Contributor Author

Thanks. So the bug was reported in 2017 and is still not fixed 3 years later.

@Eunomiac
Copy link

Eunomiac commented Mar 9, 2021

Is there an update on this? I tried using the WC3 CSS Validation Service on my CSS, and was flooded with a plethora of non-errors resulting from the validator's apparent inability to play nice with CSS variables.

First three reported errors:

image

The relevant lines of CSS referenced in the above excerpt:

  • [62]   background-image: radial-gradient(var(--dotBright), var(--dotDark));
  • [561] --bgH2: linear-gradient(270deg, var(--accentUp2), var(--accentUp4), var(--accentUp2));
  • [642] --maxHeightInput: calc(var(--lineHeightBody) * 1.2);

I've been using CSS variables for years now, and I don't quite understand how a validator can be relevant for anything but the simplest applications of CSS without at least some acknowledgment of the existence of custom CSS variables?

@dontcallmedom
Copy link
Member

@Eunomiac the place to discuss the CSS validator itself is https://github.com/w3c/css-validator/ - the particular discussion on CSS variable support is at w3c/css-validator#111

@Eunomiac
Copy link

Eunomiac commented Mar 9, 2021

@dontcallmedom Ah! My bad, I shall post over there --- should I delete my post here, or is that frowned upon?

@dontcallmedom
Copy link
Member

I don't think it's frowned upon, but I also believe there is no harm in leaving it here :)

For completeness, conversation on w3c/css-validator#111 has been locked since what is needed for this issue at this point is actual contributions rather than further assertion this is a highly wanted feature

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

4 participants