diff --git a/assets/section-main-product.css b/assets/section-main-product.css index aa4bc1837ef..7687ca7bd62 100644 --- a/assets/section-main-product.css +++ b/assets/section-main-product.css @@ -1210,18 +1210,10 @@ a.product__text { } .thumbnail img { - pointer-events: none; -} - -.thumbnail--narrow img { - height: 100%; - width: auto; - max-width: 100%; -} - -.thumbnail--wide img { - height: auto; + object-fit: cover; width: 100%; + height: 100%; + pointer-events: none; } .thumbnail__badge .icon { diff --git a/snippets/product-media-gallery.liquid b/snippets/product-media-gallery.liquid index 99478667137..cba97b47d28 100644 --- a/snippets/product-media-gallery.liquid +++ b/snippets/product-media-gallery.liquid @@ -180,6 +180,13 @@ id="Slider-Thumbnails-{{ section.id }}{{ id_append }}" class="thumbnail-list list-unstyled slider slider--mobile{% if section.settings.gallery_layout == 'thumbnail_slider' %} slider--tablet-up{% endif %}" > + {%- capture sizes -%} + (min-width: {{ settings.page_width }}px) calc(({{ settings.page_width | minus: 100 | times: media_width | round }} - 4rem) / 4), + (min-width: 990px) calc(({{ media_width | times: 100 }}vw - 4rem) / 4), + (min-width: 750px) calc((100vw - 15rem) / 8), + calc((100vw - 8rem) / 3) + {%- endcapture -%} + {%- if featured_media != null -%} {%- liquid capture media_index @@ -199,32 +206,23 @@ data-target="{{ section.id }}-{{ featured_media.id }}" data-media-position="{{ media_index }}" > + {%- capture thumbnail_id -%} + Thumbnail-{{ section.id }}-0{{ id_append }} + {%- endcapture -%} {%- endif -%} @@ -257,8 +255,11 @@ {%- render 'icon-play' -%} {%- endif -%} + {%- capture thumbnail_id -%} + Thumbnail-{{ section.id }}-{{ forloop.index }}{{ id_append }} + {%- endcapture -%} {%- endunless -%}