0

Can some one explain to me in very simple terms what the operators and, not, only and the comma , mean and do in CSS?

4
  • 2
    What do you not understand about what the spec says? Commented Apr 26, 2011 at 7:34
  • 1
    That's not very helpful. Commented Apr 26, 2011 at 7:39
  • I don't know how my question can be anymore helpful it states what I'm having trouble with. Commented Apr 26, 2011 at 7:41
  • developer.mozilla.org/en/CSS/media_queries Commented Aug 20, 2011 at 21:05

1 Answer 1

1

The four operators implement set theory logic. In that context, here is what each one means:

  • ,: equivalent of 'union'; e.g. @media screen, print matches a screen or print device

  • and: equivalent of 'intersection'; e.g. @media screen and (min-device-width: 1920px) matches a screen device with 1920px resolution

  • not: equivalent of 'set difference'; e.g. @media not screen and (color) matches a device which is not a screen and supports color

  • only: equivalent of a 'proper superset'; e.g. @media only screen and (color) matches a device which is only a screen and only supports color

References

Sign up to request clarification or add additional context in comments.

Comments

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.