A compound selector combines simple selectors without a space or other combinator. Every part must match the same element, as in a.featured: an <a> element with the featured class. section 1.1.4
Featured navigation link
With .nav a and a.featured at equal specificity, source order decides which declaration wins. The compound selector can turn the featured navigation link orange while retaining the shared navigation styles. However, applying class="featured" to a link outside the navigation may produce only the orange background, not the other button styles. section 1.1.4
Listing 1.10 Possible fix number four
.nav a {
color: white;
background-color: #13a4a4;
padding: 5px;
border-radius: 2px;
text-decoration: none;
}
a.featured { #1
background-color: orange;
}
Inspect the compact a.featured rule alongside the broader .nav a rule to see how shared and conditional styles combine. section 1.1.4
