Frontend: Proof of concept for image preview #2266
|
@ -2,7 +2,6 @@
|
|||
<img
|
||||
|
||||
:src="blobUrl"
|
||||
alt="Attachment preview"
|
||||
style="object-fit: cover;"
|
||||
>
|
||||
konrad
commented
Please do not use inline styles. This image should have a rectangular fixed size, then the Please do not use inline styles.
This image should have a rectangular fixed size, then the `object-fit` property will make sure it looks good.
|
||||
</template>
|
||||
|
||||
|
@ -31,5 +30,6 @@ watchEffect(async () => {
|
|||
<style scoped lang="scss">
|
||||
img {
|
||||
border-radius: $radius;
|
||||
konrad marked this conversation as resolved
Outdated
konrad
commented
Please use Please use `$radius` here so that the radius is consistent with other elements.
Elscrux
commented
Done! Done!
|
||||
object-fit: cover;
|
||||
konrad
commented
Adding a Adding a `width: 100%` here will make it look like what I meant (will share a screenshot later)
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user
Can you make this always the same size? Use
object-fit: cover;
to let the image fill the container nicely.I included it, but it didn't seem like it made a difference
Did you set a fixed with and height for the image?
Yes, it's at 4rem now