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

> `@function` --at-breakpoints [...] 

OK, that seems approachable. Having a `@container` as a conditional thing means we'll evaluate the container query (and other queries) later than usual, but I don't think it's substantially worse than container _units_, which already evaluate quite late.

> Mixins return [...] rule blocks (including selectors and other at-rules)

> [...] mixins [...] would be resolved during variable substitution

Those two things are not compatible. But it's possible that we'll able to impose enough restrictions on this to make it feasible, and still get something useful. For example, limit mixins to _only_ declarations, or only declarations and nested &-rules (which would allow your nested `@supports` example).

> including a suggestion from @astearns for eventually providing [a builtin keyframe-access mixin](https://css.oddbird.net/sasslike/mixins-functions/#keyframe-based-mixins-for-interpolated-values) to help address the https://github.com/w3c/csswg-drafts/issues/6245#issuecomment-1715416464 use-case

That's an interesting idea. :-)

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


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

Received on Wednesday, 13 September 2023 13:01:28 UTC