Closed WebMechanic closed 1 year ago
A working example:
@media (pointer:coarse), (pointer:fine) {
body {background:red}
}
@media (pointer:coarse) or (pointer:fine) {
body {background:green}
}
Firefox will display a green body.
Agreed that we should add this; I'll transfer this over to the compat data repo.
Hello,
it's been +1 year since this was added to "Priorization review".
There is (still) no notion in the docs how using or
instead of a comma will break compatibility, incl. Chrome/95 and similar browsers.
FF appears to remain the only browser to support this "new" syntax...
https://github.com/mdn/browser-compat-data/projects/6#card-44898176 -- apparently waiting for a PR?
Request type
Details
Burried in the Formal Syntax is
<media-or>
that allows a list of media rules to use theor
keyword. As I understand this change was added in CSS Conditional Rules Module Level 3. The keyword is not present in Media Queries Level 3.This significant change to the long time known syntax of MQ lists, that only allows for comma, should be reflected in the Compatibility table.
This "alternative" syntax is not (yet) widely supported and it appears Firefox (59+) to be the only current browser to allow a MQL using
or
instead of comma.I can only guesstimate when support was added to Firefox, presumable in 57 Nightly. I'm on Win10 Pro and current Blink or EdgeHTML don't support 'or'. I can't test WebKit/Safari.