Re: [csswg-drafts] Proposal: Custom CSS Functions & Mixins (#9350)

I see the appeal of using `@layer` for scoping but I think that would be extending the scope of what `@layers` are; worse yet, this new aspect of layers would work differently from its original one, with styles inside layers only getting overridden but functions/mixins being unavailable in higher layers regardless.

I've also thought about `@scope`, as the name already seems somewhat fitting, but that also just feels wrong, as the "scope" in that case refers to the DOM, but here a more useful approach seems to be lexical scoping based on the structure of the CSS, not the HTML.

Or maybe this is also worth its own discussion? Would it be more convenient when writing CSS to scope functions and mixins based on what is being styled (Certain elements and children), or should they be scoped to where they appear in the CSS (only within a certain stylesheet or more granular unit)?

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


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

Received on Tuesday, 16 April 2024 07:27:54 UTC