-
Notifications
You must be signed in to change notification settings - Fork 756
Description
I'm aware that parse a stylesheet and parse a list of rules are nearly identical:
- both consumes rules
- the former handle HTML comment open/close tokens and returns an object holding rules
- the latter only returns the rules
But I'm confused by the following:
"Parse a list of rules" is intended for the content of at-rules such as
@media.
https://drafts.csswg.org/css-syntax-3/#parser-entry-points
@media <media-query-list> {
<stylesheet>
}
https://drafts.csswg.org/css-conditional-3/#at-media
I think that the first quote is incorrect, and that @keyframes could replace @media in this quote.
EDIT 1:
If a given context is only intended to accept at-rules, such as in
@font-features-values, it doesn’t actually matter which production is used, but<rule-list>is preferred for its more straightforward name.
I assume the above means it doesn’t actually matter which production is used, <stylesheet> or <rule-list>, but <rule-list> [...].
This helps clarifying the different types used in CSS Syntax and CSS Conditional but the return value of parse a stylesheet and parse a list of rules actually have different shapes. But this may be a minor difference that is not worth clarifying, I do not know.
EDIT 2: I realized that parsing <stylesheet> does not mean parse a stylesheet, I'm sorry.