Re: [csswg-drafts] [css-mixins-1] A var()-based model for mixin parameters (#12927)

@EricSL 
Yes, you understand correctly; the inner divs are indeed blue and yellow, due to peculiarities of how these styles overlap in application. This exact situation is *frequently* confusing in existing code when it happens, and should really be avoided. ^_^

> A hygenic renaming that would get the value from where the mixin was applied would be:

This doesn't jive with the model here; it implies that Mixins care about the elements their styles are eventually applied to. Instead, Mixins are a *stylesheet-level* operation, which execute in the context of a given *style rule* and just output more style rules.

Doing this would also require spamming this sort of custom property cascade over *every single descendant* of an element that received apply'd styles, which would be prohibitive, or using an entirely different mechanism than custom props/variables

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


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

Received on Thursday, 5 March 2026 21:56:33 UTC