- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Tue, 30 Jun 2020 18:03:56 +0000
- To: public-css-archive@w3.org
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