docs: expand CSS module import documentation#3374
Merged
Merged
Conversation
bartlomieju
commented
Jun 30, 2026
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.
Expands the
with { type: "css" }documentation in the modules guide tocover the details requested in #3257, which the existing short section
left out.
Adds the dynamic
import(..., { with: { type: "css" } })form, theread-permission requirement for loading a stylesheet from disk, and a
description of the slice of the
CSSStyleSheetinterface that Denoactually implements:
cssRulesas a frozen array ofCSSRule(not alive
CSSRuleList),CSSRule.cssText,replace/replaceSyncdroppingtop-level
@importrules, and thenew CSSStyleSheet()constructorwithout support for its
optionsargument. Also spells out thelimitations that follow from Deno having no DOM: a sheet can't be adopted
anywhere, the rule list comes from a naive top-level split, and
insertRule/deleteRuleare not implemented.I verified each of these claims against the implementation in
ext/web/css_stylesheet.rsbefore documenting them.Closes #3257.