Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions mediaqueries/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -679,15 +679,14 @@ Combining Media Features {#media-conditions}

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

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