Examples: prefers-color-scheme: none prefers-color-scheme: aghadshudfsjhdsfkjhdsfdsfa prefers-color-scheme: visible prefers-color-scheme: hidden prefers-color-scheme: -webkit-sticky prefers-color-scheme: cssisawesome Ditto for prefers-contrast WebKit all considers them as parsable... This shows up in our WPT failures (notably the none cases for prefers-contrast/prefers-color-scheme). Example snippet to reproduce: function query_is_css_parseable(query) { const style = document.createElement('style'); style.type = 'text/css'; document.head.appendChild(style); const sheet = style.sheet; try { sheet.insertRule("@media " + query + "{}", 0); return sheet.cssRules.length == 1 && sheet.cssRules[0].media.mediaText != "not all"; } finally { while (sheet.cssRules.length) sheet.deleteRule(0); style.remove(); } } query_is_css_parseable("(prefers-color-scheme: -webkit-sticky)") // should return false
Created attachment 427783 [details] Patch
<rdar://problem/77566627>
In the future we might want to do this with generated code, the way we do with properties.
Committed r277039 (237352@main): <https://commits.webkit.org/237352@main>