Re: [WICG/webcomponents] [open-stylable] Collection of user stories (Issue #1052)

> > As a website author / component user, I want components to follow the surrounding theme and not end up with, e.g., a dark-mode contact form in a light-mode website or vice versa.
> 
> I bring this one up because it might depend on selectors like `.dark button { color: white }` detecting a `button` inside a shadow DOM attached to a descendant from a `class="dark"` element. I suspect getting combinators to work like this might cause some massive headache to the browser people, so I want to make extra sure these problems get discussed as early as possible.

@DarkWiiPlayer Some of those cases are potentially solvable with container style queries using custom properties (e.g. `@container style(--theme: dark)`). Not quite the same as using a class name, since they can be “intercepted” as they inherit down a tree (but in many ways that would be better for theming).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1052#issuecomment-2012503533
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1052/2012503533@github.com>

Received on Thursday, 21 March 2024 14:49:17 UTC