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
Use naturalSize doesn't make sense for css images #98
Comments
Thanks for reporting! The point of using the naturalSize to displaySize ratio is one that I think still makes sense for background images, although the parameters that go into the displaySize may be more complex, as you mention. Do you know if CSS background images have such concepts that we can point at directly? |
Emilio, do you have suggestions of what the spec should be? @emilio |
I mean, there's a lot that can influence how a background image is displayed (background size, background-repeat, other backgrounds occluding it...). What's the intention of the |
The intention is indeed the "rendered size". |
I think the natural/intrinsic size still makes sense for background images, and is not different from a regular |
How does it make sense? It makes no sense to me that |
How is that different from img src=giant.png width=1 height=1 or img src=giant.png style="transform: scale(.000001)">? |
Well, right, the spec as-is would return 1x1 for at least your first example wouldn't it? You're right it wouldn't for the second tho. |
Or to other examples like object-size. This is actually not an easy problem to solve, I am merely stating that it's not specific to css images. |
Researching this a bit, I think we can use the CSS terms concrete object size and natural dimensions, which apply to regular images and to background images, as well as to video etc. |
This takes CSS sizing and layout for backgrounds & regular images into account. Closes #98
We get the idea that the spec uses
naturalSize
for reporting the actual rendered size of the images, however thenaturalSize
concept doesn't make sense for CSS images.And there are many things to effect the final rendered size of a CSS image, and getting the intrinsic size doesn't mean that's the rendered size.
I think we should need to define a better description for CSS images.
cc @emilio
The text was updated successfully, but these errors were encountered: