- From: Cameron McCormack via GitHub <sysbot+gh@w3.org>
- Date: Wed, 28 Apr 2021 23:42:13 +0000
- To: public-css-archive@w3.org
> I don't think it's possible to mod @switch into doing this, because the top-level rules aren't constrained to contain only a single child conditional; it could have several, so you can't easily tell what cases it's supposed to cover (and thus what "default" should cover).
Do I remember correctly that we've previously discussed having a `supports()` function that can be used in media queries? I couldn't find the discussion after a brief search. With it, you could make `@switch` always take media query expressions:
```
@switch {
(max-width: 400px) and supports(abc: def) { ... }
not (max-width: 400px) { ... }
default { ... }
}
```
--
GitHub Notification of comment by heycam
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/112#issuecomment-828849448 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 28 April 2021 23:42:15 UTC