What is the correct terminology when referring to a CSS declaration containing CSS combinators, such as:
.myClass div { ... }
Here I’m using a declaration which will apply styles to all div elements inside an element with the class myClass.
But that is irrelevant. I’m interested in knowing the correct terminology for a declaration which mentions parent selectors.
But what is the correct terminology for this sort of declaration?
They are called Descendant Selectors, see here for more information and other terms
Just in case the W3 site ever goes down 😉 here are the important parts:
Example (also quoted from the site linked above):
For example, consider the following rules:
Although the intention of these rules is to add emphasis to text by changing its color, the effect will be lost in a case such as:
We address this case by supplementing the previous rules with a rule that sets the text color to blue whenever an EM occurs anywhere within an H1: