Can some one explain to me in very simple terms what the operators and, not, only and the comma , mean and do in CSS?
-
2What do you not understand about what the spec says?BoltClock– BoltClock2011-04-26 07:34:53 +00:00Commented Apr 26, 2011 at 7:34
-
1That's not very helpful.Delan Azabani– Delan Azabani2011-04-26 07:39:11 +00:00Commented 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.teic– teic2011-04-26 07:41:34 +00:00Commented Apr 26, 2011 at 7:41
-
developer.mozilla.org/en/CSS/media_queriesFatih Hayrioğlu– Fatih Hayrioğlu2011-08-20 21:05:12 +00:00Commented Aug 20, 2011 at 21:05
1 Answer
The four operators implement set theory logic. In that context, here is what each one means:
,: equivalent of 'union'; e.g.@media screen, printmatches a screen or print deviceand: equivalent of 'intersection'; e.g.@media screen and (min-device-width: 1920px)matches a screen device with 1920px resolutionnot: equivalent of 'set difference'; e.g.@media not screen and (color)matches a device which is not a screen and supports coloronly: 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