Cutting-Edge CSS Features
Depending on when you are reading this, the contents of this chapter may seem commonplace and less cutting-edge in your daily CSS writing. However, as these words are written, these are some of the latest additions to the CSS language.
So, here is what we will take a look at in this chapter:
- What cascade layers are and the problems they solve
- The syntax and typical applications of cascade layers
- The rules for layer ordering
- Adding imported style sheets to a layer
- Understanding the importance of
!important
- CSS nesting and its origins
- Examples of syntax and its use cases
- The
@nest
at-rule - Nesting media queries
- How to write CSS nesting today
- How to tell browser vendors you want nesting!
In the case of CSS nesting, which we will cover shortly, there are no browser implementations, merely a specification. However, it is an update to the language that I am genuinely excited about...