Re: [csswg-drafts] [css-values-5][cssom] How should <url> modifiers be used when fetching a stylesheet from an @import rule? (#12086)

Further comments from #12148:

---

["Fetch an import"](https://drafts.csswg.org/css-cascade-4/#fetch-an-import) step 3 says:

> 3. Let parsedUrl be the result of the [URL parser](https://url.spec.whatwg.org/#concept-url-parser) steps with rule’s URL and parentStylesheet’s [location](https://drafts.csswg.org/cssom-1/#concept-css-style-sheet-location). If the algorithm returns an error, return. [[CSSOM]](https://drafts.csswg.org/css-cascade-4/#biblio-cssom)

The resulting `parsedURL` won't have any of the [`<request-url-modifier>`s](https://drafts.csswg.org/css-values-5/#request-url-modifiers) 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"](https://drafts.csswg.org/css-values-4/#fetch-a-style-resource) parses the URL again:

> 3. Let parsedUrl be the result of the [URL parser](https://url.spec.whatwg.org/#concept-url-parser) steps with urlValue’s [url](https://url.spec.whatwg.org/#concept-url) and base. If the algorithm returns an error, return.

Maybe "fetch an import" step 3 is just redundant?

-- 
GitHub Notification of comment by AtkinsSJ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12086#issuecomment-2879633795 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 14 May 2025 10:16:25 UTC