Skip to content

Commit

Permalink
Merge pull request #172 from vuestorefront-community/166-fix/images-s…
Browse files Browse the repository at this point in the history
…izes-related-product

fix: sizes of images in related products component
  • Loading branch information
Baroshem authored Feb 24, 2022
2 parents 4ef6ed6 + 6726f92 commit bc333bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/changelog/1.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 1.2.0

* [Bug]: sizes of images in related products component [#172](https://github.com/vuestorefront-community/vendure/pull/172)
10 changes: 8 additions & 2 deletions packages/theme/components/RelatedProducts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:image="product.productAsset.preview"
:regular-price="$n(getCalculatedPrice(product.price.max), 'currency')"
:link="localePath(`/p/${product.productId}/${product.slug}`)"
class="carousel__item-image"
/>
</SfCarouselItem>
</SfCarousel>
Expand Down Expand Up @@ -61,9 +62,14 @@ export default {
&__item {
margin: 1.9375rem 0 2.4375rem 0;
}
::v-deep .sf-product-card__image .sf-image {
--image-height: unset;
--image-height: 230px;
--image-width: 150px;
object-fit: cover;
@include for-desktop {
--image-width: 210px;
--image-height: 340px;
}
}
}
Expand Down

0 comments on commit bc333bd

Please sign in to comment.