Description
Environment
HEAD
What problem do you want to solve?
CSS variables are a significant part of modern CSS, and in order to accurately validate property values, each rule now has to track custom properties and see where they're applied in values.
What do you think is the correct solution?
Something similar to the functionality of eslint-scope
for CSS. I'm not quite sure on the details as the custom property/var()
usage is a different paradigm than variables in JS, but something along the lines of a sourceCode.customProperties
map where the key is the custom property name and the value is an object that tracks both rules where the custom property is set and declarations where the custom property value is read. We may also want to make it easy to get the closest value for that custom property to aid in validation, similar to what I did in #148.
Participation
- I am willing to submit a pull request for this change.
Additional comments
We'd need an RFC for this to ensure we're thinking through the complexities.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status