This could be the silliest question I’ve ever made, but why does the text below is not rendered red?
<html>
<style>
.c1 .c2 {
color: red;
}
</style>
<body>
<span class="c1 c2">This should be red</span>
</body>
</html>
Edit: I want to match elements that contain both c1 and c2 classes, like the example above, no less.
.c1 .c2matches a c2 element inside a c1 element, just likehtml bodymatches a body element inside an html element. Remove the space to match an element with both classes: