Skip to content

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

Closed

Description

@jyasskin

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.

Activity

  1. self-assigned this
    on Nov 5, 2020
  2. svgeesus commented on Dec 2, 2020

    @svgeesus
    Collaborator

    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.

  3. svgeesus commented on Dec 2, 2020

    @svgeesus
    Collaborator

    The normative definition restricting @import is in CSS Cascade 5

  4. svgeesus commented on Dec 2, 2020

    @svgeesus
    Collaborator

    @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.

  5. jyasskin commented on Dec 2, 2020

    @jyasskin
    MemberAuthor

    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.

  6. svgeesus commented on Dec 2, 2020

    @svgeesus
    Collaborator

    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.

  7. jyasskin commented on Dec 2, 2020

    @jyasskin
    MemberAuthor

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

  8. fantasai commented on Dec 8, 2020

    @fantasai
    Collaborator

    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. :)

  9. fantasai commented on Dec 9, 2020

    @fantasai
    Collaborator

    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.

  10. jyasskin commented on Dec 9, 2020

    @jyasskin
    MemberAuthor

    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?

  11. css-meeting-bot commented on Dec 9, 2020

    @css-meeting-bot
    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?
  12. added
    Commenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.
    on Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions