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

var function inside attribute selectors #3284

Closed
bertdida opened this issue Nov 5, 2018 · 1 comment
Closed

var function inside attribute selectors #3284

bertdida opened this issue Nov 5, 2018 · 1 comment

Comments

@bertdida
Copy link

bertdida commented Nov 5, 2018

I propose to allow var function inside attribute selectors, something like [attribute=var(--variable)].

@tabatkins
Copy link
Member

Unfortunately, this isn't possible. Variables draw their values from custom properties, and so you need to have some element to get those from. But selectors obviously don't have an element associated with them; they select the elements! So, you can't use a var() like this.

That said, env() will allow this once custom environment variables are defined; they aren't associated with any element (they're global values instead).

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