Skip to content
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

[css-conditional-3]: Inconsistent phrasing around placement of @import rules #5697

Closed
jyasskin opened this issue Nov 5, 2020 · 10 comments
Closed
Assignees
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-conditional-3

Comments

@jyasskin
Copy link
Member

jyasskin commented Nov 5, 2020

https://drafts.csswg.org/css-conditional-3/#contents-of talks about @import being disallowed inside conditional rules, but doesn't use the same must language as https://drafts.csswg.org/css-conditional-3/#use. Unless there's something I'm missing about CSS editorial style, these should probably be consistent.

https://drafts.csswg.org/css-conditional-3/#use is phrased as restricting where @import rules can appear, but if that were actually its purpose, it ought to repeat or be unified with the restriction from https://drafts.csswg.org/css-conditional-3/#contents-of that @import and friends can't appear inside a conditional rule. But I think it's actually specifying that conditional rules must not appear before @import and friends. If that's your intent, it might be clearer to say it that way.

@svgeesus
Copy link
Contributor

svgeesus commented Dec 2, 2020

https://drafts.csswg.org/css-conditional-3/#contents-of talks about @import being disallowed inside conditional rules, but doesn't use the same must language as https://drafts.csswg.org/css-conditional-3/#use. Unless there's something I'm missing about CSS editorial style, these should probably be consistent.

That is because it is inside an example.

The normative statement is the definition of <stylesheet>.

The further explanation says that

they can accept any rule that is normally allowed at the top-level of a stylesheet, and not otherwise restricted

There is then an example of something (@import) which is further restricted. Examples are not normative. Although, this particular example uses the word MUST which is bad practice and should be reworded.

@svgeesus
Copy link
Contributor

svgeesus commented Dec 2, 2020

The normative definition restricting @import is in CSS Cascade 5

@svgeesus
Copy link
Contributor

svgeesus commented Dec 2, 2020

@jyasskin does that explanation make sense? If so we can close the issue; but if not, I have Agenda+ the issue for the next CSS telcon (9 Dec). Might you be able to join the call, in that case? It is 12 noon US East Coast.

@jyasskin
Copy link
Member Author

jyasskin commented Dec 2, 2020

I hadn't read "Any @import rules must precede all other valid at-rules and style rules in a style sheet (ignoring @charset)" from https://drafts.csswg.org/css-cascade-5/#at-import. It's not totally obvious that a "style sheet", used there, is a different thing from a <stylesheet>, used as the content of the at-rules, but also seems clear enough that I'm happy to close that part of the issue.

I think my second paragraph, about https://drafts.csswg.org/css-conditional-3/#use, is less resolved.
Having read that bit of css-cascade, I now think that the second paragraph of https://drafts.csswg.org/css-conditional-3/#use is redundant with it since the conditional rules are at-rules, and "Any @import rules must precede all other valid at-rules". @namespace has similar wording in its spec. @charset is unique and ... not actually a rule anymore ... but already defined not to follow anything else. If there are rules that are only restricted relative to style rules but not at-rules, this paragraph would still have an effect, but it could then benefit from a different set of examples. Maybe replace it with a note?

I'm happy to dial into the 9 Dec telecon.

@svgeesus
Copy link
Contributor

svgeesus commented Dec 2, 2020

Thanks @jyasskin.

@astearns @atanassov would it be possible to have this early on the agenda, so that @jyasskin doesn't need to call in for the whole hour?

CSS Conditional 3 is now in the queue for updated CR so I would like to get any edits arising from this issue cleared up before it is published.

@jyasskin
Copy link
Member Author

jyasskin commented Dec 2, 2020

I'm happy to dial in for the whole meeting. I should know more about the CSSWG anyway. :)

@fantasai
Copy link
Collaborator

fantasai commented Dec 8, 2020

This seems editorial, I'm not sure it warrants telecon time? I agree with both comments in #5697 (comment) and I think we can just fix it. That said, happy for @jyasskin to attend a CSSWG call either way. :)

@fantasai
Copy link
Collaborator

fantasai commented Dec 9, 2020

OK, rewrote https://drafts.csswg.org/css-conditional-3/#use @jyasskin Lmk if it seems acceptable!

Wrt “style sheet” vs <stylesheet>, I actually think it is worth fixing, and that we should fix that by changing <stylesheet> to some other name to avoid this confusion.

@jyasskin
Copy link
Member Author

jyasskin commented Dec 9, 2020

That looks good, thanks! Do you want to keep this issue open for the <stylesheet>->something else change or track that in a better-named issue?

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-conditional-3]: Inconsistent phrasing around placement of @import rules.

The full IRC log of that discussion <dael> Topic: [css-conditional-3]: Inconsistent phrasing around placement of @import rules
<dael> github: https://github.com//issues/5697
<dael> jeffery: Looks fine
<dael> fantasai: Remaining question is sthere is a stylesheet construct that isn't for entire style sheet. Confusing and should change. Should we file as separate issue? Concerns?
<dael> astearns: Tracked as a separate issue
<dael> fantasai: Should we resolve it should be changed?
<dael> astearns: Why don't you raise the separate issue, discuss there, see if anyone disagrees, particularly TabAtkins.
<dael> astearns: We'll close this as editorial?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-conditional-3
4 participants