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

Make constructed stylesheets not support quirks mode #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rakina
Copy link
Member

@rakina rakina commented Dec 10, 2018

Constructed stylesheets should not support quirks mode. See WICG/construct-stylesheets#59. I'm not sure if I need to make a WPT for this and how to link from a draft spec. I guess this shouldn't be merged until constructable stylesheets are part of CSSOM?

cc @domenic


Preview | Diff

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit, but @zcorpan is the final word.

@@ -240,6 +240,8 @@ above properties in its "Value" grammar.
supported in the <code><a method for=CSS lt="supports(property, value)">supports()</a></code> static
method of the {{CSS}} interface.</p>

<p><a>Quirky colors</a> must not be supported on a <a interface>CSSStyleSheet</a> where the <a>constructed flag</a> is set.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use {{CSSStyleSheet}} instead, to get the proper monospace font. Here and below.

Copy link
Member

@zcorpan zcorpan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cc @tabatkins to sanity-check

@zcorpan
Copy link
Member

zcorpan commented Dec 10, 2018

WPT would be good to have for this.

What do you mean with link from a draft spec?

@rakina
Copy link
Member Author

rakina commented Dec 10, 2018

OK, I'll try to make a WPT then.

What do you mean with link from a draft spec?

For the "constructed flag" definition, which is currently only defined in https://wicg.github.io/construct-stylesheets/index.html#cssstylesheet-constructed-flag

@annevk
Copy link
Member

annevk commented Dec 10, 2018

I appreciate that we're standardizing this, but I'd like the layering to be different I think. I think the model should be that a style sheet also has a quirks mode slot, which it typically inherits from a document, but not always.

Note that you can also end up in this situation with the Link header in some browsers, coupled with document.open().

@domenic
Copy link
Member

domenic commented Dec 10, 2018

Yep, that's definitely the ideal layering, but I think given that the quirks mode spec already has several of these "this syntax must only be supported in X contexts", we should continue with that pattern for now, and let the editors of CSSOM/Quirks work on fixing the layering later.

Base automatically changed from master to main January 15, 2021 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants