Option to prevent link[rel="stylesheet"]
elements in index.html from being merged into a single link[rel="stylesheet"]
element
#18674
Labels
Description
It seems that CSS WG is willing to lift the restriction on constructed flag for adoptedStylesheets: w3c/csswg-drafts#10013 (comment).
After the restriction is lifted, we can easily apply the stylesheet of one of the global
link[rel="stylesheet"]
to Shadow Roots.(Even if the restriction is not lifted, we still have workarounds.)
Example (vanilla + SCSS)
Currently, since Vite always merge
link[rel="stylesheet"]
elements in index.html, we cannot do it this way.Suggested solution
Add an option, like:
to make
link[rel="stylesheet"]
elements in index.html not being merged.Alternative
Additional context
I opened a discussion some days ago: #18632.
Validations
The text was updated successfully, but these errors were encountered: