I want srcset and sizes to relate to the container rather than the viewport

Submitted by Bernard Nijenhuis

Currently, images with srcset and sizes attributes 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 like srcset to relate to the container they’re in, and not the viewport.

Tagged
HTML