- From: Steve Orvell via GitHub <noreply@w3.org>
- Date: Wed, 05 Nov 2025 00:30:39 +0000
- To: public-css-archive@w3.org
Sorry in advance if this isn't the right issue for this...
I think `@mixin` has the potential to address most of the styling flexibility issues that exist with Shadow DOM. A style in a shadowRoot would use `:host { @apply --my-element-mixin(); }` to opt-in to rules potentially defined in a containing scope (e.g. [this example](https://lit.dev/playground/#gist=fa6f376a7265ebbb2aa58f4630dd9d49) in Chrome Canary 144).
For cases where this kind of permissive styling is desired, one of the only concerns I have with this is that it's a bit cumbersome to apply conditional styling. You can use `if` but only for individual properties and the application site isn't available.
Using `@container style(...)` in conjunction with `@mixin`, with either nested in the other, seems viable to address this, at least from an authoring perspective .
--
GitHub Notification of comment by sorvell
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12627#issuecomment-3488556563 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 00:30:40 UTC