Re: [csswg-drafts] [css-mixins] Proposal: `@like` rule for repurposing page default styles (#10222)

Reference Selectors from #3714 would introduce a special selector syntax to make _specific_ rulesets importable in other places, while this proposal would make any effective ruleset importable in other places based on standard selectors. The motivation for this is that component authors want to incorporate styles that they have no control over nor access to. 

Without pouring too much thought into this proposed solution, it feels incredibly powerful – _too_ powerful in fact. I cannot imagine this could be implemented in an efficient manner, but I may be wrong. Also, selectors inside rule blocks make me feel icky. 

Authors should indeed be able to declare that a (part of a) component is of a particular generic “type”, and then get a site-specific default styling for it, but since `:role()` never got anywhere unfortunately, we do not have the necessary abstract semantic base in existing stylesheets: they all work on concrete predefined element type names specific to the document type (i.e. HTML) and on arbitrary custom class names. I don’t know how to solve this. 

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


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

Received on Thursday, 27 June 2024 10:09:35 UTC