- From: Miriam Suzanne via GitHub <sysbot+gh@w3.org>
- Date: Thu, 22 Sep 2022 17:12:34 +0000
- To: public-css-archive@w3.org
Could also consider a `selector()` function in the `@when` syntax? I'm not sure if that's been discussed. I realized the other day that style queries help work around this issue, but with an unfortunate parent/child limitation. We can do something like: ```css @media (prefers-color-scheme: dark) { html { --mode: dark; } } .dark-mode { --mode: dark; } /* the result of this query is based on the combined media-query/selector resolutions */ @container style(--mode: dark) { /* has to be a descendant of the element that sets the value 👎🏼 */ body { background: black; color: white; /* the full list of colors only have to be defined in one place 👍🏼 */ } } ``` But it feels like a workaround, rather than a full solution. -- GitHub Notification of comment by mirisuzanne Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6247#issuecomment-1255316287 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 22 September 2022 17:12:36 UTC