Summary
At the beginning of this chapter, we considered how we can write our styles differently using CSS nesting, as a helpful “syntactic sugar” to visually encapsulate rules. We also considered CSS Layers, and where they are applicable, and the problems they can help with.
After that, we took a deep dive into how to select almost anything we need on the page with CSS’s powerful selection capabilities.
We also considered the newer selection technique of using @scope
to limit selections by their position in the DOM.
Alongside all that, we also found time to look at the @supports
at-rule for providing feature forks in our code.
Despite all the great new features and techniques that we covered in this chapter, we’ve still only touched the surface of what we can do with CSS.
In the next chapter, we are going to take a look at typography on the web. If you don’t know your @font-face
from your registered-axis
, come with me to Chapter...