Re: [csswg-drafts] [css-conditional] CSS.supports for media queries? (#5272)

What about

```js
let testMedia = str => matchMedia(`${str}, not ${str}`).matches;
testMedia("(prefers-this-doesnt-exist: lolwat)"); // false
testMedia("(prefers-color-scheme: light)"); // true
```

or

```js
let testMedia = str => matchMedia(str).media === str;
testMedia("(prefers-this-doesnt-exist: lolwat)"); // false
testMedia("(prefers-color-scheme: light)"); // true
```

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5272#issuecomment-651954249 using your GitHub account

Received on Tuesday, 30 June 2020 18:04:34 UTC