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-variables-1] Please clarify in the Intro about custom properties *cascading* #2451

Closed
Tyler-H opened this issue Mar 16, 2018 · 1 comment

Comments

@Tyler-H
Copy link

Tyler-H commented Mar 16, 2018

The CSS Variables spec Intro concludes by saying

and the change will propagate to all uses of that variable automatically.

But this isn't quite true. It will only propagate to all cascaded uses of that variable automatically, no? If that's correct, it would be useful to help clear up some confusion with authors thinking a CSS variable can be used in elements that do not cascade from the element where the custom property was declared.

If correct, I suggest simply adding in the word cascaded there:

and the changes will propagate to all cascaded uses of that variable automatically.

@fantasai fantasai added the css-variables-1 Current Work label Mar 29, 2018
@tabatkins
Copy link
Member

I don't think this is unclear in the intro, and the correction doesn't help (and possibly makes it worse) - it suggests that there are *non-*cascaded uses of a variable.

The cascade is intrinsic to the "use" of a variable here; using a var(--foo) on an element without a connection to any --foo property is the same as using a JS variable in one function that's only defined in an unrelated function.

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

3 participants