feat(VImg): fit content prop to adjust container size to image
Description
The rounded prop of VImage should apply regardless of container dimensions. A fit-content prop will resize the image container based on the image, eliminating the space and applying the rounded to the image as needed.
Issue Reported: https://discord.com/channels/340160225338195969/954061264865349652/1354127256988946432
Markup:
<template>
<div class="h-25">
<v-img
fit-content
rounded="lg"
src="https://cdn.vuetifyjs.com/images/parallax/material.jpg"
/>
</div>
</template>
This doesn't really work if the image is larger than its container, now the rest is just cropped off instead of resizing to fit. It also doesn't respect aspect-ratio.
This doesn't really work if the image is larger than its container, now the rest is just cropped off instead of resizing to fit. It also doesn't respect aspect-ratio.
I'll check when the image is larger. This doesn't work with aspect-ratio on purpose (is what I was thinking) it follows the image's aspect ratio. lmk