Is this just a regular descendant selector?


I just read through a style sheet and came across this:

.class1.class2 .class3 {}

(pay attention to the space between .class2 and .class3)

Does that mean "select each object with attribute “class 3” which is a direct descendant of an object with both attributes “class1 and class2” "?


Yes, this targets any element that that is a descendant of any other element that has both class1 and class2.

For example:

<div class="class1 class2">
  <p> text</p>
     <p class="3">it would target me</p>
     <p class="3">it would target me</p>
     <p class="3">text</p>

VERY OLD version of IE did not support class chaining like this… but these days it’s hardly an issue.

ok I got it!

Thank you very much.