From 64ff0dd55c92a045ee2f05309fbf3f536e29fe25 Mon Sep 17 00:00:00 2001 From: Christopher Kirk-Nielsen Date: Wed, 22 Jan 2025 00:48:58 -0500 Subject: [PATCH] Clarify parens conditions --- files/en-us/web/api/window/matchmedia/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/window/matchmedia/index.md b/files/en-us/web/api/window/matchmedia/index.md index 7cb22050e3a007e..df49e6744019e54 100644 --- a/files/en-us/web/api/window/matchmedia/index.md +++ b/files/en-us/web/api/window/matchmedia/index.md @@ -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