Re: [csswg-drafts] [mediaqueries-5][css-conditional-5][css-mixins-1] Order dependent rules and adopted stylesheets (#13041)

> We could ditch order dependence for mixins given some other reasonable restrictions, but then we'd still have all of these issues for `@custom-media / @custom-supports`.

Ordering dependence feels very counter to my css mental model. From an authoring perspective, `@mixin` feels more revolutionary than `:has`; it's a feature CSS has needed since the get go. Otoh, `@custom-media / @custom-supports` seems pretty niche. Therefore having special handling for `@mixin` seems at least justifiable.

> The sentiment in the CSSWG was previously that order dependence or not doesn't matter for authors, because they'll declare their mixins (or named things in general) before using them anyway. 

I'm concerned with this limitation in conjunction with cross-scope usage since, as noted [here](https://github.com/w3c/csswg-drafts/issues/12627), I think `@mixin` can go a long way towards addressing the styling flexibility issues with Shadow DOM that block its wider usage. In particular, having to order stylesheets that define mixins specifically v. js code that defines custom elements that make adopted stylesheets that apply mixins... seems like it will be hard and limiting.

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


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

Received on Wednesday, 5 November 2025 15:38:05 UTC