Keep in mind that with rules and selectors there are completely different things.
At-rules are described in this section of the CSS2.1 specification , which states that the at rule consists of one keyword followed by a statement (whether it be a statement with a trailing semicolon or a block). As for the CSS parser, you have a set of three separate at rules, one prefix for each provider, and one rule without prior fix for the standard one.
More suitable for rules is the set of rules or style rules described here . A set of rules consists of a selector and a declaration block (containing style declarations). This is similar to the contents of the at-rule, as described above. It also means that the selector is only part of the ruleset.
Certain at rules allow you to enter comma-separated values ββin your preludes, for example @media :
@media screen, projection { }
But instead of grouping the entire at-rules, grouping occurs inside the value that appears after the at keyword at the beginning of the rule.
This @media can be broken down into two separate rules:
@media screen { } @media projection { }
Note that each rule has its own @media keyword.
Similarly, when you group multiple selectors into one rule, you have one style rule. The part that is grouped is a selector; Everything in the following declaration block applies to all selectors listed in the group:
.foo, .bar { }
And when you expand it, it becomes two sets of rules:
.foo { } .bar { }
source share