I want srcset and sizes to relate to the container rather than the viewport
#61
aarongustafson
started this conversation in
Wants
Replies: 1 comment 1 reply
-
|
It would be nice, but I don't think browsers would be able to decide which image to load before the rendering is done, which would be much later than current feature. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, images with
srcsetandsizesattributes can only be used relative to the viewport. When you have a more dynamic design where images are different widths depending on the content, you’d likesrcsetto relate to the container they’re in, and not the viewport.https://webwewant.fyi/wants/5f1aa74a3bfb5b5fff803e91/
Beta Was this translation helpful? Give feedback.
All reactions