Skip to content

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

Set 100% as width so that images in product descriptions won't overflow

jxltomed4009a4e549
diff --git a/saleor/static/dashboard/scss/layouts/_product-details.scss b/saleor/static/dashboard/scss/layouts/_product-details.scss
index d93de1bb9d..062b807f37 100644
--- a/saleor/static/dashboard/scss/layouts/_product-details.scss
+++ b/saleor/static/dashboard/scss/layouts/_product-details.scss
@@ -5,3 +5,9 @@
&__title {}
&__switch {}
}
+
+.product-description {
+ img {
+ max-width: 100%;
+ }
+}
diff --git a/templates/dashboard/product/detail.html b/templates/dashboard/product/detail.html
index 928ee938c4..0e60d2a93d 100644
--- a/templates/dashboard/product/detail.html
+++ b/templates/dashboard/product/detail.html
@@ -66,9 +66,11 @@
<h5>{% render_availability_status product %}</h5>
</div>
</div>
- <p>
- {{ product.description | safe }}
- </p>
+ <div class="product-description">
+ <p>
+ {{ product.description | safe }}
+ </p>
+ </div>
</div>
<div class="card-action">
<a href="{% url "dashboard:product-update" product.pk %}" class="btn-flat waves-effect">