Skip to content

Commit b695579

Browse files
frivoaltabatkins
authored andcommitted
[mediaqueries-4] Can't have 'not', 'and' and 'or' at the same level (#185)
1 parent 9527b50 commit b695579

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

mediaqueries/Overview.bs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -679,15 +679,14 @@ Combining Media Features {#media-conditions}
679679

680680
* <a>Media conditions</a> can be grouped by wrapping them in parentheses ''()''
681681
which can then be nested within a condition the same as a single media query.
682-
For example, ''not (color) or (hover)''
682+
For example, ''(not (color)) or (hover)''
683683
is true on devices that are monochrome
684-
and/or that have hover capabilities,
685-
because the ''not'' only applies to the immediately following ''(color)'' feature.
684+
and/or that have hover capabilities.
686685
If one instead wanted to query for a device that was monochrome and <em>didn't</em> have hover capabilities,
687686
it must instead be written as ''not ((color) or (hover))''
688-
(or, equivalently, as ''not (color) and not (hover)'').
687+
(or, equivalently, as ''(not (color)) and (not (hover))'').
689688

690-
It is <em>invalid</em> to mix ''and'' and ''or'' at the same “level” of a media query.
689+
It is <em>invalid</em> to mix ''and'' and ''or'' and ''not'' at the same “level” of a media query.
691690
For example, ''(color) and (pointer) or (hover)'' is illegal,
692691
as it's unclear what was meant.
693692
Instead, parentheses can be used to group things using a particular joining keyword,

0 commit comments

Comments
 (0)