Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update scss to make img in img-wrapper center horizontally and vertically

jxltomae227b8317df
diff --git a/saleor/static/scss/layouts/_product-list.scss b/saleor/static/scss/layouts/_product-list.scss
index db6e7abe4a..d7f02de9a0 100644
--- a/saleor/static/scss/layouts/_product-list.scss
+++ b/saleor/static/scss/layouts/_product-list.scss
@@ -14,8 +14,13 @@
.product-list {
text-align: center;
margin-bottom: $global-margin * 2;
- img {
- max-width: 100%;
+ .img-wrapper {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ img {
+ max-width: 100%;
+ }
}
&-item-name {
margin: $global-margin / 2 0;
diff --git a/saleor/static/scss/layouts/_product-page.scss b/saleor/static/scss/layouts/_product-page.scss
index 0f3a3e8336..cdcd66d8d3 100644
--- a/saleor/static/scss/layouts/_product-page.scss
+++ b/saleor/static/scss/layouts/_product-page.scss
@@ -74,9 +74,13 @@
}
.carousel-item {
flex-flow: column;
- img {
- width: 100%;
- height: 100%;
+ .img-wrapper {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ img {
+ width: 100%;
+ }
}
}
.carousel-indicators {