0

I was wondering what does the operators and, only, not and the comma , do and mean when used with the media queries?

Are there any other operators that can be used with the media queries?

0

1 Answer 1

2

Please read the Media Queries Specification, it's only 1 page long. In summary though:

  • and means both things must match
  • , means one of the things must match
  • not means the query is true when it doesn't match
  • only is mentioned in the spec but I can't find a definition. I suspect it does nothing.
Sign up to request clarification or add additional context in comments.

2 Comments

are these the only operators for media queries?
no, there's min- and max- variations on some keywords as well. all is a reserved word as well (meaning all media types). Your answers are in the linked specification.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.