diff --git a/assets/js/blocks/product-gallery/style.scss b/assets/js/blocks/product-gallery/style.scss index 660cfed5c9a..32d602105c4 100644 --- a/assets/js/blocks/product-gallery/style.scss +++ b/assets/js/blocks/product-gallery/style.scss @@ -28,7 +28,7 @@ $outside-image-max-width: calc(100% - (2 * $outside-image-offset)); width: calc(100vw - 100px); border: none; border-radius: 10px; - height: 90vh; + height: calc(100vh - 100px); top: 0; margin-top: $gap-largest; margin-bottom: $gap-largest; @@ -76,6 +76,11 @@ $outside-image-max-width: calc(100% - (2 * $outside-image-offset)); z-index: 1; transition: all 0.1s linear; + dialog & { + max-height: calc(100vh - 160px); + width: auto; + } + // Keep the order in this way. The hoverZoom class should override the full-screen-on-click class when both are applied. &.wc-block-woocommerce-product-gallery-large-image__image--full-screen-on-click { cursor: pointer; @@ -217,6 +222,15 @@ $outside-image-max-width: calc(100% - (2 * $outside-image-offset)); // Thumbnails #{$thumbnails} { + + dialog & { + height: calc(100vh - 160px); + overflow-y: scroll; + display: flex; + flex-flow: column wrap; + justify-content: flex-start; + } + img { cursor: pointer; } @@ -231,5 +245,14 @@ $outside-image-max-width: calc(100% - (2 * $outside-image-offset)); height: 100px; margin: 5px; + dialog & { + width: auto; + height: auto; + margin: 5px; + max-width: 90px; + max-height: 90px; + min-width: 40px; + min-height: 40px; + } } } diff --git a/templates/parts/product-gallery.html b/templates/parts/product-gallery.html index 19108d590fd..dc449278483 100644 --- a/templates/parts/product-gallery.html +++ b/templates/parts/product-gallery.html @@ -1,27 +1,27 @@