- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Thu, 26 Mar 2020 21:27:12 +0000
- To: public-css-archive@w3.org
> = hierarchy, because to handle all combinations I need to setup my queries that way, e.g. color-scheme and then contrast and results in those matrices of query (+ selectors)
Hm, not sure what you mean by that.
You do need to combine/nest the queries to cover all the combinations, yes. But the order you do them in makes no difference. All of the following are identical:
```css
@media (prefers-color-scheme: dark) {
@media (prefers-contrast: high) {
:root { --fg: white; --bg: black; }
}
}
@media (prefers-contrast: high) {
@media (prefers-color-scheme: dark) {
:root { --fg: white; --bg: black; }
}
}
@media (prefers-color-scheme: dark) and (prefers-contrast: high) {
:root { --fg: white; --bg: black; }
}
```
--
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4895#issuecomment-604695887 using your GitHub account
Received on Thursday, 26 March 2020 21:27:14 UTC