This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into update/extensibility-docs
- Loading branch information
Showing
37 changed files
with
678 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
assets/js/blocks/product-gallery/inner-blocks/product-gallery-large-image/editor.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
.wc-block-editor-product-gallery-large-image { | ||
width: 100%; | ||
|
||
img { | ||
max-width: 100%; | ||
margin: 0 auto; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 26 additions & 13 deletions
39
assets/js/blocks/product-gallery/inner-blocks/product-gallery-thumbnails/editor.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
.wc-block-product-gallery-thumbnails { | ||
width: fit-content; | ||
.wc-block-editor-product-gallery-thumbnails { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
$thumbnails: ".wc-block-editor-product-gallery-thumbnails"; | ||
$thumbnails-gap: 15px; | ||
|
||
&.wc-block-editor-product-gallery-thumbnails--bottom { | ||
flex-flow: row nowrap; | ||
} | ||
#{$thumbnails} { | ||
display: flex; | ||
|
||
img { | ||
width: 100px; | ||
height: 100px; | ||
margin: 5px; | ||
} | ||
.wc-block-product-gallery-thumbnails--position-bottom & { | ||
flex-direction: row; | ||
gap: 0 15px; | ||
} | ||
|
||
.wc-block-product-gallery-thumbnails:not(.wc-block-product-gallery-thumbnails--position-bottom) & { | ||
flex-direction: column; | ||
gap: 15px 0; | ||
} | ||
} | ||
|
||
@for $i from 3 through 8 { | ||
// Calculate the total width occupied by the gaps between thumbnails. | ||
$gap-width: $thumbnails-gap * ($i - 1); | ||
|
||
// Calculate the border width, which is multiplied by 2 to account for both sides of each thumbnail. | ||
$border-width: ($i * 1px * 2); | ||
|
||
$additional-space: $i * 1px; | ||
|
||
.wc-block-product-gallery-thumbnails--number-of-thumbnails-#{$i}:not(.wc-block-product-gallery-thumbnails--position-bottom) { | ||
flex-basis: calc((100% - #{$gap-width} - #{$border-width} - #{$additional-space}) / #{$i}); | ||
} | ||
} |
Oops, something went wrong.