Make Module teaser apear the same way as before... (important for images with fixed height)

This commit is contained in:
Lorenz Padberg 2024-04-25 15:51:08 +02:00
parent 4ecd99a7b0
commit 77f0fbcce9
1 changed files with 5 additions and 7 deletions

View File

@ -14,7 +14,6 @@
:style="placeholderStyle" :style="placeholderStyle"
v-show="!loaded" v-show="!loaded"
></div> ></div>
</div> </div>
</template> </template>
@ -91,7 +90,6 @@ const isHighDensity = () => {
); );
}; };
onMounted(updateDimensions); onMounted(updateDimensions);
</script> </script>
@ -100,17 +98,17 @@ onMounted(updateDimensions);
.wagtail-image { .wagtail-image {
overflow: hidden; overflow: hidden;
height: 100%;
&__image { &__image {
width: 100%; width: 100%;
//height: 100%; height: 100%;
height: auto; /* Keep the image's aspect ratio intact */ object-fit: cover;
object-position: center;
} }
&__placeholder { &__placeholder {
background-color: $color-silver-light; background-color: $color-silver-light;
} }
} }
</style> </style>