Post
If you have a large DOM / heavy content / lots of features running when that happens, that can really hurt. So, what if we could have a non-global `@property` at-rule to limit the restyling to just what was loaded? frehner.me/blog/non-glo... THIS IS NOT "SCOPED" `@property`!
frehner.meA proposal for non-global @property at-rulesWithout changing how CSS Custom Properties behave, let's see if we can optimize how they perform when lazily loaded and defined within a selector.
Thoughts? Reactions? Also, I included a whole section of references, because there has been a lot of talk about "scoped" CSS vars, and why they can't work. And I wanted to be clear that this proposal isn't that. Haha.
0 reposts3 likes
Yea what @lukewarlow.dev said. Often the reason these problems exist is in the vicinity of "no one did the work to fix it yet".
I believe github.com/w3c/csswg-dr... is the issue you are looking for.
github.com[css-scoping] Scoping of functions, other name-defining at-rules and custom idents · Issue #11798 · w3c/csswg-draftsContext There are many name-defining at-rules in CSS. Examples: @keyframes, @property, @counter-style, @position-try, and, soon, @function, etc. There are also many custom idents, regular or dashed...