image
image copied to clipboard
Support arbitrary values for the "sizes" attribute
I think that supporting arbitrary values for the sizes attribute should be possible like this:
<nuxt-picture
src="/images/mountains.jpg"
sizes="100vw"
/>
Or maybe even more important more complex examples like this:
<nuxt-picture
src="/images/mountains.jpg"
sizes="(max-width: 960px) 33vw, 100vw"
/>
Basically we should support all valid values as documented here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-sizes
Here is a sandbox of an example:
https://codesandbox.io/s/jolly-kate-febtx?file=/pages/index.vue