Skip to content

Commit

Permalink
Update files/en-us/web/api/window/matchmedia/index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena authored Jan 23, 2025
1 parent a677f8b commit a3c56a7
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 @@ -25,7 +25,7 @@ matchMedia(mediaQueryString)
- `mediaQueryString`
- : A string specifying the media query to parse into a {{domxref("MediaQueryList")}}.

Just like in CSS, any [media feature](/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.
Just like in CSS, any [media feature](/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 a3c56a7

Please sign in to comment.