-
Notifications
You must be signed in to change notification settings - Fork 142
[css-typed-om] CSSURLImageValue #703
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
Comments
I'm wondering if it would be worthwhile to reify it as an actual URL object. Tho I guess that doesn't support keeping relative urls as relative, or fragment references as fragment references. |
So here's the wrinkles:
We can maybe ditch (2) and just find some reasonable base url to resolve against. (I went looking for precedent and found that, whoops, it's just completely unspecified for the FontFace object. Filed w3c/csswg-drafts#2343.) In fact, it's probably better to do so - the base-url behavior in stylesheets is often kinda confusing, and having it vary based on exactly where you're setting would probably be confusing to authors. (1) is at least easy to recognize - if it starts with a |
We discussed (1) before. And I think we agreed that we would tag those as special values. Note that per https://url.spec.whatwg.org/#url-apis-elsewhere you don't want to use URL objects, but you should eagerly parse generally. |
But yeah, I think you should sort out how this works in general as otherwise the object model might not match how style sheets work... |
I'm pretty sure that some user agents parse URL values eagerly.
Yields none in Firefox,
url(https://test:test)
in Safari, andurl("https://test:test/")
(!) in Chrome.It seems rather crappy if
new CSSURLImageValue("https://test:test")
did not throw.The text was updated successfully, but these errors were encountered: