In stylesheets, the majority of CSS rules (NOT talking about SASS or LESS here) are structured like this:
selector {
property_1 : value_1;
.
.
.
property_n : value_n;
}
There is only 1 {} block attached to the selector (with no sub {} blocks inside). Call this degree of nesting = 1.
With at-rules though, we see rules such as this:
@media screen and (min-width:1000px) {
body {
font-size: 20px;
}
}
There is clearly a nested CSS block inside the @media rule, so degree of nesting = 2
The highest I can imagine is something that has a nesting degree = 3 such as this:
@media screen and (min-width:1000px) {
@keyframes myidentifier {
0% { top: 0; left: 0; }
100% { top: 100px; left: 100%; }
}
}
Is it possible to nest CSS blocks any deeper than this?