Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Inherent width behavior not as described in doc #628

Closed
gerwitz opened this issue Feb 2, 2016 · 4 comments
Closed

Inherent width behavior not as described in doc #628

gerwitz opened this issue Feb 2, 2016 · 4 comments

Comments

@gerwitz
Copy link

gerwitz commented Feb 2, 2016

#266 appears to have addressed issues of using the inherent size of a 1x to size a 2x. And the site's demonstration describes this behavior:

The 2x source will be shown at the inherent width of the 1x source—so the two sources will occupy the same space in your layout, but the 2x source will be displayed at double the pixel density

But I am not seeing this on Safari 9.0.3 on OS X 10.11.3, as seen in the attached:

screen shot 2016-02-02 at 13 32 50
screen shot 2016-02-02 at 13 33 06

(I wouldn't imagine that requesting the 1x only to determine the inherent size is the intended behavior, but the docs do seem to imply this will happen.)

@aFarkas
Copy link
Collaborator

aFarkas commented Feb 2, 2016

Actually Safari has implemented this natively. And it works in your demo the 1x and the 2x image are displayed with the same size in your layout.

Also note: We do not download the 1x image to detect it's size. In fact we know that 2x has to be displayed with it's half size to match the 1x image.

You can try this by changing the example and replace the 2x with 1.5x or 2.5x.

Does this answer your question.

@gerwitz
Copy link
Author

gerwitz commented Feb 2, 2016

You have a very puzzling interpretation of "displayed with the same size in your layout" considering those two screenshots!

I assume the behavior you described. I file this issue because I believe the documentation is wrong. This is demonstrated by the documentation itself which references a 2x image that is actually 1.6x, and thus occupies less space in the layout.

I interpreted "inherent width" as "the width of the src designated for 1x." This is clearly not the case, but perhaps there is a more clear way to say "scaled relative to the specified size"?

@aFarkas
Copy link
Collaborator

aFarkas commented Feb 2, 2016

lol, you are right.

aFarkas pushed a commit that referenced this issue Feb 2, 2016
aFarkas pushed a commit that referenced this issue Feb 2, 2016
improve intrinsic dimension demo (see #628)
@mike-engel
Copy link
Collaborator

Docs improved in #630. Thanks for the info @gerwitz!

tedw pushed a commit to Threespot/picturefill that referenced this issue Jun 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants