-
Notifications
You must be signed in to change notification settings - Fork 715
[css-images] image-set() resolution should be applied on-top of, not instead-of the natural image resolution. #6241
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
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [css-images] image-set() resolution should be applied on-top of, not instead-of the natural image resolution.<dael> github: https://github.com//issues/6241 <dael> emilio: Matches existing impl. Basically spec says if you omit image-set resolution then you use natural image resolution <dael> emilio: If you spec image-set resolution it overrides whatever resolution image has <dael> emilio: Allows to figure out if image has native resolution. Not amazing. Chrome and WK apply image resolution and then image-set resolution. Seems reasonable and sensible <dael> emilio: So this should agree with existing impl <dael> TabAtkins: Happy to resolve on agree with existing impl. I'm not sure how this is supposed to work from reading thread. Do not understand multiplying resolution by exif resolution gives you something usable <dael> emilio: It's a cross-origin info leak <dael> TabAtkins: I suspect something more subtile is happening than I understand. Feels rediculous. But we'll figure it out <dael> emilio: If you find out what it is that's great <dael> TabAtkins: I'd like us to match so happy to resolve <dael> TabAtkins: Prop: image-set should act like source-set attribute with applying resolution <TabAtkins> s/source-set/srcset/ <dael> Rossen_: Objections? <dael> RESOLVED: image-set should act like sRCset attribute with applying resolution |
So if I understand correctly, we want this:
|
Exactly. That’s the current implementation. If WPT/selenium supported DPR we could add tests for this. |
OK, thanks. It should work that way both for same-origin and CORS-cross-origin, right? |
If so, the |
Yes, origin is not playing a part in this. The rationale was we didn't want the image's CORS-ness to affect its natural size in implicit ways. Where CORS would play a part would be if we ever implement CSS |
You mean I am not sure there is an actual use for |
Yes.
OK. I'll file a separate issue about |
I think it should be testable anyway. Have an image with 2x density per EXIF, and use it in |
…thout <resolution> See w3c/csswg-drafts#6241
…IF density and image-set() without <resolution>, a=testonly Automatic update from web-platform-tests [css-images] Test interaction between EXIF density and image-set() without <resolution> See w3c/csswg-drafts#6241 -- wpt-commits: dd22aff7c80fc46d697009ffc1db7ec3c7f25334 wpt-pr: 29137
…IF density and image-set() without <resolution>, a=testonly Automatic update from web-platform-tests [css-images] Test interaction between EXIF density and image-set() without <resolution> See w3c/csswg-drafts#6241 -- wpt-commits: dd22aff7c80fc46d697009ffc1db7ec3c7f25334 wpt-pr: 29137
Right now https://drafts.csswg.org/css-images-4/#image-set-notation says:
That doesn't seem to match implementations, which apply the scaling on top of the natural orientation of the image. See whatwg/html#5574 (comment) and previous discussion.
cc @noamr
The text was updated successfully, but these errors were encountered: