Skip to content

[css-syntax] <stylesheet> grammar construct should be named differently since it's not a "style sheet" #5774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jyasskin opened this issue Dec 9, 2020 · 5 comments

Comments

@jyasskin
Copy link
Member

jyasskin commented Dec 9, 2020

As discussed in #5697 (comment), "@import rules must precede all other valid at-rules and style rules in a style sheet" ([css-cascade]), but that's not the same "style sheet" as is spelled "<stylesheet>" and appears inside things like the conditional at-rules. This isn't a terrible problem, but it's also a bit confusing.

@fantasai suggested the right fix is to rename <stylesheet>. The telecon discussion suggested to explicitly ask @tabatkins if they object.

@tabatkins
Copy link
Member

I don't object, just not sure what new name to use, since <stylesheet> means "anything allowed in a stylesheet (except those are only allowed in a top-level context, like @import)".

@svgeesus
Copy link
Contributor

svgeesus commented Dec 9, 2020

<stylesheet-body> perhaps, and the part where @import etc live could be <stylesheet-head> and thus, a stylesheet is <stylesheet-head> <stylesheet-body>

@fantasai
Copy link
Collaborator

fantasai commented Dec 9, 2020

I was going to suggest <styleset> but @svgeesus’s suggestion is a nice idea. Do we allow @font-face and @Keyframes inside conditional rules yet, though? Because if not then there's a top-level vs. encased distinction rather than a header vs. body distinction.

@tabatkins
Copy link
Member

After discussing with @fantasai we decided that <stylesheet-body> makes the most sense, even if we don't use any sort of *-head production. (I'm just personally not a fan of "styleset".)

We'll defer actually making the change until January, since virtually all of the specs currently using it are pending publication currently, and will go up before a new Syntax /TR will. We'll just do some editorial repubs for all of them later once Syntax gets republished.

@tabatkins
Copy link
Member

I ended up making this moot with the new Syntax text, since I changed all the productions anyway. Nothing is named <stylesheet> anymore. (Things that previously used it now just use <rule-list>.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants