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

This looks promising to me, although probably quite hard to do. I think we'd need to cut this down a bit more to approach it.

> Mixins somewhat mitigate but do not completely solve this problem, as they require a shared contract between the page author and the author pulling in those styles (which may be separate entities). E.g. components cannot trust that a certain mixin has been defined on the page, and even if they could, it's tedious for the page author to define new mixins every time they want to try out a new component (not to mention that as mixins are currently envisioned this would require a lot of code duplication).

A do feel however that we should not add _both_ `@like` (or similar) _and_ [mixins](https://css.oddbird.net/sasslike/mixins-functions/#defining-a-mixin-the-mixin-rule) when they overlap so much. (As far as I can tell, this proposal can basically do mixins, except for the arguments part). cc @mirisuzanne

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


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

Received on Monday, 1 July 2024 23:30:52 UTC