Skip to content

[css-values-4] How does an empty url serialize? #6587

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
smfr opened this issue Sep 9, 2021 · 4 comments
Closed

[css-values-4] How does an empty url serialize? #6587

smfr opened this issue Sep 9, 2021 · 4 comments
Labels
css-values-4 Current Work

Comments

@smfr
Copy link
Contributor

smfr commented Sep 9, 2021

https://drafts.csswg.org/css-values/#url-empty says how empty urls (url()) are resolved, but not how they are serialized.

Gecko serializes as url("about:invalid"), WebKit and Blink serialize as the resolved url (i.e. the base URL).

@smfr smfr added css-values-4 Current Work Agenda+ labels Sep 9, 2021
@smfr
Copy link
Contributor Author

smfr commented Sep 9, 2021

#2211 talked about this, and the IRC log says:

<fantasai> TabAtkins: Proposal is that the empty URL, rather than being treated as a relative URL, is treated as an invalid URL
<fantasai> TabAtkins: Computed value is still an empty string, just treated like 'about:invalid'

but the test css/css-values/urls/empty.html expects that the computed style is the the base URL. @gsnedders @emilio ?

@emilio
Copy link
Collaborator

emilio commented Sep 9, 2021

Serializing to a valid URL like WebKit / Blink do seems wrong. If we do that then that breaks round-tripping.

I'm not in love with the about:invalid behavior, but I think it should be either that or serializing to url() / url("").

@gsnedders
Copy link
Member

This is a duplicate of #6447

@smfr
Copy link
Contributor Author

smfr commented Sep 9, 2021

Closing as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-values-4 Current Work
Projects
None yet
Development

No branches or pull requests

4 participants