[WIP] Add style sheet module scripts#4423
Closed
littledan wants to merge 1 commit into
Closed
Conversation
Member
|
Very cool. I think ultimately this will be blocked on fixing the foundations of the |
379b29a to
5ebee9b
Compare
This patch provides CSS modules as a single default export, of a CSSStyleSheet object, which is not added to the document. Edge cases which I didn't see discussed elsewhere: - @imports are recursively fetched together with the module graph, blocking script execution. Network errors reached prevent the execution of the entire module graph. - Any MIME type whose essence is "text/css" is accepted; this appears to be weaker checking than elsewhere in the specification. - Although the Constructable Stylesheet Objects proposal is used for infrastructure, the resulting CSSStyleSheet object acts as if it were not constructed (i.e., you can't call the replace() method). Note, the Constructable Stylesheet Objects proposal makes important steps to specifying loading of @import, but there may still be room for more precise plumbing with HTML. This text ensures that style sheet module scripts have a base URL and fetch options, which might be referenced by the definition of @import in the future. Closes WICG/webcomponents#759
Member
|
Closing per discussion in #4898 (adds the same thing). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch provides CSS modules as a single default export, of
a CSSStyleSheet object, which is not added to the document.
Edge cases which I didn't see discussed elsewhere:
blocking script execution. Network errors reached prevent the
execution of the entire module graph.
to be weaker checking than elsewhere in the specification.
infrastructure, the resulting CSSStyleSheet object acts as if it
were not constructed (i.e., you can't call the replace() method).
Note, the Constructable Stylesheet Objects proposal makes important steps
to specifying loading of @import, but there may still be room for more
precise plumbing with HTML. This text ensures that style sheet module scripts
have a base URL and fetch options, which might be referenced by the definition
of @import in the future.
Closes #4315
Closes WICG/webcomponents#759
/infrastructure.html ( diff )
/references.html ( diff )
/scripting.html ( diff )
/webappapis.html ( diff )