Skip to content

Commit

Permalink
Clarify parens conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskirknielsen authored Jan 22, 2025
1 parent 1570119 commit 64ff0dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/api/window/matchmedia/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ matchMedia(mediaQueryString)
- : A string specifying the media query to parse into a {{domxref("MediaQueryList")}}.

> [!NOTE]
> Each `mediaQueryString` condition must be wrapped in parentheses, for example: `matchMedia('(min-width: 600px)')` will work, whereas `matchMedia('min-width: 600px')` will not!
> Just like in CSS, any [media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_features) must be wrapped in parentheses inside the expression. For example: `matchMedia('(max-width: 600px)')` will work, whereas `matchMedia('max-width: 600px')` will not. Keywords for media types (`all`, `print`, `screen`) and logical operators (`and`, `or`, `not`, `only`) do not need to be wrapped in parentheses.
### Return value

Expand Down

0 comments on commit 64ff0dd

Please sign in to comment.