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

Please add support for CSS variables ("custom properties"), a widely supported and crucial feature. #111

Closed
Hexstream opened this issue Dec 23, 2017 · 6 comments

Comments

@Hexstream
Copy link

Hexstream commented Dec 23, 2017

Hello,

As can be seen at https://caniuse.com/#feat=css-variables, today CSS variables ("custom properties") is a widely supported feature in all modern standards-compliant browsers. (Of course, Internet Explorer is not in any way modern or standards-compliant.)

I am proudly coding all my sites by hand in raw HTML5/CSS3 according to the W3C standards and recently started using CSS variables heavily (a much-awaited feature!), which results in dozens of validation "errors" whenever someone clicks one of my ✔ CSS3 links in the footer of my pages, which links to the validation results for that page using your validator.

I take pride in having no or very few validation errors in my pages. Having to explain to users that these "errors" are not actual errors and are more akin to a bug in the validator is pretty awkward. So please finally add support for CSS variables, a widely supported and crucial feature.

(edit: I just noticed that the CSS variables specification is "only" at the Candidate Recommendation stage (since 3 december 2015), but still...)

sideshowbarker added a commit that referenced this issue Feb 15, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Feb 15, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for allowing the @supports and @Viewport at-rules. The intent is that
we’ll add full support for them later, and then at that time back this change
out — or else at least just use it as a starting point for full support.

This change simply causes no errors to be reported for stylesheets that use
@supports and @Viewport. Beyond that, it doesn’t add any checking to report an
error if the content of a particular @supports at-rule or @Viewport at-rule
doesn’t conform to the requirements in the relevant CSS specs.

Addresses #111
sideshowbarker added a commit that referenced this issue Feb 15, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for allowing the @supports and @Viewport at-rules. The intent is that
we’ll add full support for them later, and then at that time back this change
out — or else at least just use it as a starting point for full support.

This change simply causes no errors to be reported for stylesheets that use
@supports and @Viewport. Beyond that, it doesn’t add any checking to report an
error if the content of a particular @supports at-rule or @Viewport at-rule
doesn’t conform to the requirements in the relevant CSS specs.

Addresses #111
sideshowbarker added a commit that referenced this issue Feb 15, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Feb 15, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Feb 16, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Feb 24, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
@Hexstream
Copy link
Author

Thanks for fixing but the validator instance at https://jigsaw.w3.org/css-validator/ doesn't seem to have been updated yet?... (Example)

sideshowbarker added a commit that referenced this issue Mar 10, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Mar 10, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Apr 6, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Jun 5, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Jun 7, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Jun 7, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Jun 7, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Jun 25, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Jul 30, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Aug 26, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
sideshowbarker added a commit that referenced this issue Aug 28, 2018
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses #111
@implico
Copy link

implico commented Sep 4, 2018

Is it going to be fixed?

@svgeesus
Copy link

svgeesus commented Dec 7, 2020

Is it going to be fixed?

w3c/specberus#1030

@ylafon
Copy link
Member

ylafon commented Dec 7, 2020

See #173 those are not validated but should not generate errors.

@ylafon
Copy link
Member

ylafon commented Aug 31, 2021

See #316 most use of var() should now work, missing are proper handling of definitions (now buried under "unknown vendor extension", but at least it should not fail).

@w3c w3c unlocked this conversation Aug 31, 2021
@ylafon
Copy link
Member

ylafon commented Sep 12, 2021

See #324 This is probably the best we can do so far for static checks for dynamic values.
I am closing this, but there might be some new issues relative to implementation of variables that will emerge.

@ylafon ylafon closed this as completed Sep 12, 2021
RichardCox09 pushed a commit to Handig-Eekhoorn/css-validator that referenced this issue Jun 10, 2022
This change is a temporary workaround that adds an interim/initial/partial level
of support for handling CSS custom properties and the `var(...)` function. The
intent is that we’ll add full support later, and then at that time back this
change out — or else at least just use it as a starting point for full support.

This change simply allows declarations to contain custom property names (that
is, identifiers starting with two dashes) and to contain the `var(...)` function
(with a custom property name as the first argument). Beyond that, it doesn’t add
any checking to report an error if a `var(...)` function contains a custom
property name that the stylesheet hasn’t actually defined, and no checking to
report an error if a particular property has an expression with a `var(...)`
function which resolves to a value that’s not allowed for that property.

Addresses w3c#111
vmcj added a commit to vmcj/domjudge that referenced this issue Nov 13, 2023
The validator can't handle this
(w3c/css-validator#111) and the feature is
only a draft (https://www.w3.org/TR/css-variables-1/) but widely
supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants