Re: [csswg-drafts] [css-variables?] Higher level custom properties that control multiple declarations (#5624)

Two things:
1. "Inheritance" of attributes in the tree (`:lang`-like)
2. Ability to use the value of an attribute as a token stream (`var(...)`-like)

The combination of these two things means you can write any selector you would use `:const()` for using an attribute instead. In terms of expressive power, both have the same benefits.

I agree this is more about cementing the current use of attributes in web components and making it a workable solution than creating an entirely new css solution to the root problem. That said, the benefits of a css solution that is super limited in what it can do anyway and doubles the time required in cascade cost doesn't seem worthwhile to pursue to me, at first glance (as I doubt any major site would take the performance hit to be able to use this convenience, but I could be convinced otherwise).

Also, I am afraid we probably would not get that new cascade pass anytime soon, while a minor change to how attributes can be used in css sounds easier to land, and would help web components author directly today.

-- 
GitHub Notification of comment by FremyCompany
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5624#issuecomment-773364023 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 4 February 2021 14:47:11 UTC