You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As such, for an @import rule, which uses the production so can have URL modifiers, its not clear how exactly those modifiers should apply to the fetch.
Let parsedUrl be the result of the URL parser steps with rule’s URL and parentStylesheet’s location. If the algorithm returns an error, return. [CSSOM]
The resulting parsedURL won't have any of the s that the original @import's URL may have had, when it is then passed to "fetch a style resource".
It's also confusing that we parse the URL here, and then step 3 of "fetch a style resource" parses the URL again:
Let parsedUrl be the result of the URL parser steps with urlValue’s url and base. If the algorithm returns an error, return.
Maybe "fetch an import" step 3 is just redundant?
noamr
added a commit
to noamr/csswg-drafts
that referenced
this issue
Jun 2, 2025
…s-4] [css-shapes-2] Clean up fetching
This fixes a few cases around fetching external URLs for style resources:
- The base URL is the sheet's base URL if exists, otherwise the sheet's location, otherwise the document
base URL.
- The algorithm can take either a rule or declaration block, and derive the correct stylesheet and base
URL from that.
Updated the calling sites to take that onto account.
- Removed redundant URL parsing in "@import".
Closesw3c#12065Closesw3c#12068Closesw3c#12086Closesw3c#12147
As far as I can find, stylesheet fetching uses the algorithm in cssom, fetch a style sheet and does not include use of any of CSS Values 4, fetch a style resource.
As such, for an @import rule, which uses the
production so can have URL modifiers, its not clear how exactly those modifiers should apply to the fetch.(cc @noamr, @annevk, @tabatkins, @fantasai)
The text was updated successfully, but these errors were encountered: