Skip to content

[css-cascade] "Fetch an import" discards CSS URL modifiers #12148

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

Closed
AtkinsSJ opened this issue May 2, 2025 · 2 comments
Closed

[css-cascade] "Fetch an import" discards CSS URL modifiers #12148

AtkinsSJ opened this issue May 2, 2025 · 2 comments
Labels
topic: urls Tracking issues that'll need edits when CSS URLs are defined on top of Fetch.

Comments

@AtkinsSJ
Copy link
Contributor

AtkinsSJ commented May 2, 2025

"Fetch an import" step 3 says:

  1. 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 <request-url-modifier>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:

  1. 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?

cc: @noamr

@weinig weinig added the topic: urls Tracking issues that'll need edits when CSS URLs are defined on top of Fetch. label May 14, 2025
@weinig
Copy link
Contributor

weinig commented May 14, 2025

Dupe of #12086?

@AtkinsSJ
Copy link
Contributor Author

Partly, yeah. I'll copy my comments to that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: urls Tracking issues that'll need edits when CSS URLs are defined on top of Fetch.
Projects
None yet
Development

No branches or pull requests

2 participants