Skip to content

Validator Does Not Recognize CSS Custom Variables #295

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

Closed
Eunomiac opened this issue Mar 9, 2021 · 1 comment
Closed

Validator Does Not Recognize CSS Custom Variables #295

Eunomiac opened this issue Mar 9, 2021 · 1 comment
Assignees
Labels

Comments

@Eunomiac
Copy link

Eunomiac commented Mar 9, 2021

(I realize this issue has been raised before, but they appear to be locked to collaborators and lack any recent updates, so I hope it's alright that I post this anew)

Has there been any progress on this? I've seen this issue being raised periodically over most of the past decade, but 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?

@ylafon
Copy link
Member

ylafon commented Aug 31, 2021

fixed by #316

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

No branches or pull requests

2 participants