Like Daniel A. White said the comma is an implicit OR operator. It can only be used at the highest level meaning you can only concatenate two or more full selectors using the comma. Something like this XPath expression //*[@class or @id]
cannot be achieved with CSS selectors.
The AND operator is implicit. If you want a div to have class1
and class2
you write div.class1.class2
. This means that AND only works on a single level. If you want to have
.class1 > .class3
AND .class2 > .class3
then you would get .class1.class2 > .class3
.
But what would it mean to have .class1 > .class3
AND .class2 > .class4
? It is entirely ambiguous and cannot be solved with CSS selectors, because it doesn't make sense.