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

[cssom-1] Indicating when a style sheet is script-blocking is duplicated several times #3103

Open
domfarolino opened this issue Sep 13, 2018 · 4 comments
Labels

Comments

@domfarolino
Copy link
Member

In the HTML Standard's Interactions of styling and scripting section we have the definition of the "style sheet ready" flag for CSS style sheets. We also have a list of conditions which, if met, make a style sheet a script-blocking one. Not too long ago this section was reformatted, and another condition has been added.

The "style sheet ready" flag is seemingly never used or set, and we're going to change (and maybe rename?) this to be a flag that makes a style sheet that was previously script-blocking, no longer script-blocking. When searching around for usages of the flag, I noticed that some text at the bottom of both the xml-stylesheet process instruction and Link header requirements sections mention the conditions that make a style sheet a script-blocking one. This seems like normative information that is duplicated from the HTML Standard, and can easily get out of sync (like with the adding of more conditions as we've seen).

Would the editors accept a PR from me that replaces these paragraphs with something like a "Note" linking to the appropriate section in the HTML Standard so this logic might stay in one place?

/cc @emilio @annevk

@annevk
Copy link
Member

annevk commented Sep 13, 2018

I think we'd need to make changes on both sides if we want to reuse HTML's definition. E.g., the xml-stylesheet processing instruction is not an element whereas HTML only talks about elements.

I do agree it makes sense though, especially as they are already out-of-sync.

@emilio
Copy link
Collaborator

emilio commented Sep 13, 2018

Would the editors accept a PR from me that replaces these paragraphs with something like a "Note" linking to the appropriate section in the HTML Standard so this logic might stay in one place?

Please do! Otherwise let me know if you don't have the cycles and I'll do the edits myself. Thanks!

@emilio emilio added the cssom-1 label Sep 13, 2018
@domfarolino
Copy link
Member Author

@annevk I think I understand the changes you refer to on the HTML side, but could you clarify what changes would need made elsewhere? Are you saying we should add text in the CSSOM spec and wherever xml-stylesheet processing is that says, "In the context of a web page, these style sheets can be script-blocking [HTML], given the conditions defined in that standard" or something?

@annevk
Copy link
Member

annevk commented Sep 14, 2018

@domfarolino I think on the CSSOM side we can mostly remove text as it's already tied to HTML through the Document object to which the styles are added. One thing that might be worth fixing at some point (but is a large undertaking) is to make CSSOM less handwavy about arguments to algorithms vs global state. Or rather, modernize its algorithms in general.

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

No branches or pull requests

3 participants