Re: [csswg-drafts] [css-values-4] [css-cascade-4] [css-color-5] [css-fonts-4] [css-images-4] [css-shapes-2] Clean up fetching (#12261)

> Thanks, this looks pretty solid to me.
> 
> One thing that I've been alerted to this morning, (see [LadybirdBrowser/ladybird#4972](https://github.com/LadybirdBrowser/ladybird/issues/4972)) that's related to this, is that the fetch algorithms operate on relative URLs (and expect them to not be resolved yet) but the values spec requires that the computed value of an URL is absolute:
> 
> > When a  appears in the computed value of a property, it is resolved to an absolute URL, as described in the preceding paragraph. The computed value of a URL that the [UA](https://drafts.csswg.org/css-2023/#user-agent) cannot resolve to an absolute URL is the specified value.
> > https://drafts.csswg.org/css-values-4/#relative-urls
> 
> That suggests that either we're absolutizing URLs in two different places with potentially different rules, or that the absolutization in fetch is redundant as the URL will already be absolute. (Or I'm missing something.) Sorry for not catching this earlier!

Good spotting, thanks to both you and to the Ladybird project for keeping the specs honest!

I've extracted out the "resolve to absolute URL" bit, and referred to it from https://drafts.csswg.org/css-values-4/#relative-urls. IO think it should make a lot more sense now.

-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/12261#issuecomment-2934832652 using your GitHub account


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

Received on Tuesday, 3 June 2025 11:38:10 UTC