I am working on a project with an example that could be simplified to the following. What do you call the name of the technique being used in the CSS?
<html>
<head>
<style type="text/css">
#numberone #numbertwo #numberthree
{
color: red;
}
</style>
</head>
<body>
<div id="numberone">
<div id="numbertwo">
<div id="numberthree">
This is red
</div>
</div>
</div>
<div id="numberthree">
This is not red
</div>
</body>
</html>
I assume you are referring to the use of descendant combinators to target an element with a specific ancestor structure. From the spec:
I’m going to modify your CSS to use class selectors rather than ID selectors, since ID values have to be unique in a document. This example will select elements with the class name
numberthreethat are descendants of elements with the class namenumbertwothat are descendants of elements with the class namenumberone:Whereas this example will select all elements with the class name
numberthreeregardless of their ancestors:So given your example markup (again, modified to use classes) the following would apply: