This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The CSSStyleSheet and CSSGroupingRule interfaces both have a insertRule() method that refers (indirectly) to the "Parse a rule" algorithm of CSS Syntax. The result of "Parse a rule" (when it’s not a syntax error) is a generic qualified rule or at-rule whose prelude and block can contain anything. These concepts of generic rules exist for separation of concerns so that Syntax does not have to know about Selectors, every CSS at-rule, etc. For example, a valid qualified rule can be an invalid style rule if its prelude is an invalid list of selectors. Perhaps I’m splitting hairs, but I think that CSSOM is missing a step where the results from Syntax are parsed further into specific rules, as defined in their respective specification. This can return a syntax error even if Syntax’s "Parse a rule" did not, in which case insertRule() should throw.
https://dvcs.w3.org/hg/csswg/rev/b47ea7ac01c7