|
.blocks-gallery-grid, |
|
.wp-block-gallery { |
|
display: flex; |
|
flex-wrap: wrap; |
|
list-style-type: none; |
|
padding: 0; |
|
margin: 0; |
|
} |
|
|
|
.blocks-gallery-grid .blocks-gallery-image, |
|
.blocks-gallery-grid .blocks-gallery-item, |
|
.wp-block-gallery .blocks-gallery-image, |
|
.wp-block-gallery .blocks-gallery-item { |
|
margin: 0 16px 16px 0; |
|
display: flex; |
|
flex-grow: 1; |
|
flex-direction: column; |
|
justify-content: center; |
|
position: relative; |
|
} |
|
|
|
.blocks-gallery-grid .blocks-gallery-image figure, |
|
.blocks-gallery-grid .blocks-gallery-item figure, |
|
.wp-block-gallery .blocks-gallery-image figure, |
|
.wp-block-gallery .blocks-gallery-item figure { |
|
margin: 0; |
|
height: 100%; |
|
} |
|
|
|
@supports ((position: -webkit-sticky) or (position: sticky)) { |
|
.blocks-gallery-grid .blocks-gallery-image figure, |
|
.blocks-gallery-grid .blocks-gallery-item figure, |
|
.wp-block-gallery .blocks-gallery-image figure, |
|
.wp-block-gallery .blocks-gallery-item figure { |
|
display: flex; |
|
align-items: flex-end; |
|
justify-content: flex-start; |
|
} |
|
} |
|
|
|
.blocks-gallery-grid .blocks-gallery-image img, |
|
.blocks-gallery-grid .blocks-gallery-item img, |
|
.wp-block-gallery .blocks-gallery-image img, |
|
.wp-block-gallery .blocks-gallery-item img { |
|
display: block; |
|
max-width: 100%; |
|
height: auto; |
|
width: 100%; |
|
} |
|
|
|
@supports ((position: -webkit-sticky) or (position: sticky)) { |
|
.blocks-gallery-grid .blocks-gallery-image img, |
|
.blocks-gallery-grid .blocks-gallery-item img, |
|
.wp-block-gallery .blocks-gallery-image img, |
|
.wp-block-gallery .blocks-gallery-item img { |
|
width: auto; |
|
} |
|
} |
|
|
|
.blocks-gallery-grid .blocks-gallery-image figcaption, |
|
.blocks-gallery-grid .blocks-gallery-item figcaption, |
|
.wp-block-gallery .blocks-gallery-image figcaption, |
|
.wp-block-gallery .blocks-gallery-item figcaption { |
|
position: absolute; |
|
bottom: 0; |
|
width: 100%; |
|
max-height: 100%; |
|
overflow: auto; |
|
padding: 40px 10px 9px; |
|
color: #fff; |
|
text-align: center; |
|
font-size: 13px; |
|
background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3) 70%, transparent); |
|
} |
|
|
|
.blocks-gallery-grid .blocks-gallery-image figcaption img, |
|
.blocks-gallery-grid .blocks-gallery-item figcaption img, |
|
.wp-block-gallery .blocks-gallery-image figcaption img, |
|
.wp-block-gallery .blocks-gallery-item figcaption img { |
|
display: inline; |
|
} |
|
|
|
.blocks-gallery-grid.is-cropped .blocks-gallery-image a, |
|
.blocks-gallery-grid.is-cropped .blocks-gallery-image img, |
|
.blocks-gallery-grid.is-cropped .blocks-gallery-item a, |
|
.blocks-gallery-grid.is-cropped .blocks-gallery-item img, |
|
.wp-block-gallery.is-cropped .blocks-gallery-image a, |
|
.wp-block-gallery.is-cropped .blocks-gallery-image img, |
|
.wp-block-gallery.is-cropped .blocks-gallery-item a, |
|
.wp-block-gallery.is-cropped .blocks-gallery-item img { |
|
width: 100%; |
|
} |
|
|
|
@supports ((position: -webkit-sticky) or (position: sticky)) { |
|
.blocks-gallery-grid.is-cropped .blocks-gallery-image a, |
|
.blocks-gallery-grid.is-cropped .blocks-gallery-image img, |
|
.blocks-gallery-grid.is-cropped .blocks-gallery-item a, |
|
.blocks-gallery-grid.is-cropped .blocks-gallery-item img, |
|
.wp-block-gallery.is-cropped .blocks-gallery-image a, |
|
.wp-block-gallery.is-cropped .blocks-gallery-image img, |
|
.wp-block-gallery.is-cropped .blocks-gallery-item a, |
|
.wp-block-gallery.is-cropped .blocks-gallery-item img { |
|
height: 100%; |
|
flex: 1; |
|
-o-object-fit: cover; |
|
object-fit: cover; |
|
} |
|
} |
|
|
|
.blocks-gallery-grid .blocks-gallery-image, |
|
.blocks-gallery-grid .blocks-gallery-item, |
|
.wp-block-gallery .blocks-gallery-image, |
|
.wp-block-gallery .blocks-gallery-item { |
|
width: calc((100% - 16px) / 2); |
|
} |
|
|
|
.blocks-gallery-grid .blocks-gallery-image:nth-of-type(2n), |
|
.blocks-gallery-grid .blocks-gallery-item:nth-of-type(2n), |
|
.wp-block-gallery .blocks-gallery-image:nth-of-type(2n), |
|
.wp-block-gallery .blocks-gallery-item:nth-of-type(2n) { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.columns-1 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-1 .blocks-gallery-item, |
|
.wp-block-gallery.columns-1 .blocks-gallery-image, |
|
.wp-block-gallery.columns-1 .blocks-gallery-item { |
|
width: 100%; |
|
margin-right: 0; |
|
} |
|
|
|
@media (min-width: 600px) { |
|
.blocks-gallery-grid.columns-3 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-3 .blocks-gallery-item, |
|
.wp-block-gallery.columns-3 .blocks-gallery-image, |
|
.wp-block-gallery.columns-3 .blocks-gallery-item { |
|
width: calc((100% - 32px) / 3); |
|
margin-right: 16px; |
|
} |
|
|
|
@supports (-ms-ime-align: auto) { |
|
.blocks-gallery-grid.columns-3 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-3 .blocks-gallery-item, |
|
.wp-block-gallery.columns-3 .blocks-gallery-image, |
|
.wp-block-gallery.columns-3 .blocks-gallery-item { |
|
width: calc((100% - 32px) / 3 - 1px); |
|
} |
|
} |
|
|
|
.blocks-gallery-grid.columns-4 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-4 .blocks-gallery-item, |
|
.wp-block-gallery.columns-4 .blocks-gallery-image, |
|
.wp-block-gallery.columns-4 .blocks-gallery-item { |
|
width: calc((100% - 48px) / 4); |
|
margin-right: 16px; |
|
} |
|
|
|
@supports (-ms-ime-align: auto) { |
|
.blocks-gallery-grid.columns-4 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-4 .blocks-gallery-item, |
|
.wp-block-gallery.columns-4 .blocks-gallery-image, |
|
.wp-block-gallery.columns-4 .blocks-gallery-item { |
|
width: calc((100% - 48px) / 4 - 1px); |
|
} |
|
} |
|
|
|
.blocks-gallery-grid.columns-5 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-5 .blocks-gallery-item, |
|
.wp-block-gallery.columns-5 .blocks-gallery-image, |
|
.wp-block-gallery.columns-5 .blocks-gallery-item { |
|
width: calc((100% - 64px) / 5); |
|
margin-right: 16px; |
|
} |
|
|
|
@supports (-ms-ime-align: auto) { |
|
.blocks-gallery-grid.columns-5 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-5 .blocks-gallery-item, |
|
.wp-block-gallery.columns-5 .blocks-gallery-image, |
|
.wp-block-gallery.columns-5 .blocks-gallery-item { |
|
width: calc((100% - 64px) / 5 - 1px); |
|
} |
|
} |
|
|
|
.blocks-gallery-grid.columns-6 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-6 .blocks-gallery-item, |
|
.wp-block-gallery.columns-6 .blocks-gallery-image, |
|
.wp-block-gallery.columns-6 .blocks-gallery-item { |
|
width: calc((100% - 80px) / 6); |
|
margin-right: 16px; |
|
} |
|
|
|
@supports (-ms-ime-align: auto) { |
|
.blocks-gallery-grid.columns-6 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-6 .blocks-gallery-item, |
|
.wp-block-gallery.columns-6 .blocks-gallery-image, |
|
.wp-block-gallery.columns-6 .blocks-gallery-item { |
|
width: calc((100% - 80px) / 6 - 1px); |
|
} |
|
} |
|
|
|
.blocks-gallery-grid.columns-7 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-7 .blocks-gallery-item, |
|
.wp-block-gallery.columns-7 .blocks-gallery-image, |
|
.wp-block-gallery.columns-7 .blocks-gallery-item { |
|
width: calc((100% - 96px) / 7); |
|
margin-right: 16px; |
|
} |
|
|
|
@supports (-ms-ime-align: auto) { |
|
.blocks-gallery-grid.columns-7 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-7 .blocks-gallery-item, |
|
.wp-block-gallery.columns-7 .blocks-gallery-image, |
|
.wp-block-gallery.columns-7 .blocks-gallery-item { |
|
width: calc((100% - 96px) / 7 - 1px); |
|
} |
|
} |
|
|
|
.blocks-gallery-grid.columns-8 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-8 .blocks-gallery-item, |
|
.wp-block-gallery.columns-8 .blocks-gallery-image, |
|
.wp-block-gallery.columns-8 .blocks-gallery-item { |
|
width: calc((100% - 112px) / 8); |
|
margin-right: 16px; |
|
} |
|
|
|
@supports (-ms-ime-align: auto) { |
|
.blocks-gallery-grid.columns-8 .blocks-gallery-image, |
|
.blocks-gallery-grid.columns-8 .blocks-gallery-item, |
|
.wp-block-gallery.columns-8 .blocks-gallery-image, |
|
.wp-block-gallery.columns-8 .blocks-gallery-item { |
|
width: calc((100% - 112px) / 8 - 1px); |
|
} |
|
} |
|
|
|
.blocks-gallery-grid.columns-1 .blocks-gallery-image:nth-of-type(1n), |
|
.blocks-gallery-grid.columns-1 .blocks-gallery-item:nth-of-type(1n), |
|
.wp-block-gallery.columns-1 .blocks-gallery-image:nth-of-type(1n), |
|
.wp-block-gallery.columns-1 .blocks-gallery-item:nth-of-type(1n) { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.columns-2 .blocks-gallery-image:nth-of-type(2n), |
|
.blocks-gallery-grid.columns-2 .blocks-gallery-item:nth-of-type(2n), |
|
.wp-block-gallery.columns-2 .blocks-gallery-image:nth-of-type(2n), |
|
.wp-block-gallery.columns-2 .blocks-gallery-item:nth-of-type(2n) { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.columns-3 .blocks-gallery-image:nth-of-type(3n), |
|
.blocks-gallery-grid.columns-3 .blocks-gallery-item:nth-of-type(3n), |
|
.wp-block-gallery.columns-3 .blocks-gallery-image:nth-of-type(3n), |
|
.wp-block-gallery.columns-3 .blocks-gallery-item:nth-of-type(3n) { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.columns-4 .blocks-gallery-image:nth-of-type(4n), |
|
.blocks-gallery-grid.columns-4 .blocks-gallery-item:nth-of-type(4n), |
|
.wp-block-gallery.columns-4 .blocks-gallery-image:nth-of-type(4n), |
|
.wp-block-gallery.columns-4 .blocks-gallery-item:nth-of-type(4n) { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.columns-5 .blocks-gallery-image:nth-of-type(5n), |
|
.blocks-gallery-grid.columns-5 .blocks-gallery-item:nth-of-type(5n), |
|
.wp-block-gallery.columns-5 .blocks-gallery-image:nth-of-type(5n), |
|
.wp-block-gallery.columns-5 .blocks-gallery-item:nth-of-type(5n) { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.columns-6 .blocks-gallery-image:nth-of-type(6n), |
|
.blocks-gallery-grid.columns-6 .blocks-gallery-item:nth-of-type(6n), |
|
.wp-block-gallery.columns-6 .blocks-gallery-image:nth-of-type(6n), |
|
.wp-block-gallery.columns-6 .blocks-gallery-item:nth-of-type(6n) { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.columns-7 .blocks-gallery-image:nth-of-type(7n), |
|
.blocks-gallery-grid.columns-7 .blocks-gallery-item:nth-of-type(7n), |
|
.wp-block-gallery.columns-7 .blocks-gallery-image:nth-of-type(7n), |
|
.wp-block-gallery.columns-7 .blocks-gallery-item:nth-of-type(7n) { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.columns-8 .blocks-gallery-image:nth-of-type(8n), |
|
.blocks-gallery-grid.columns-8 .blocks-gallery-item:nth-of-type(8n), |
|
.wp-block-gallery.columns-8 .blocks-gallery-image:nth-of-type(8n), |
|
.wp-block-gallery.columns-8 .blocks-gallery-item:nth-of-type(8n) { |
|
margin-right: 0; |
|
} |
|
} |
|
|
|
.blocks-gallery-grid .blocks-gallery-image:last-child, |
|
.blocks-gallery-grid .blocks-gallery-item:last-child, |
|
.wp-block-gallery .blocks-gallery-image:last-child, |
|
.wp-block-gallery .blocks-gallery-item:last-child { |
|
margin-right: 0; |
|
} |
|
|
|
.blocks-gallery-grid.alignleft, |
|
.blocks-gallery-grid.alignright, |
|
.wp-block-gallery.alignleft, |
|
.wp-block-gallery.alignright { |
|
max-width: 305px; |
|
width: 100%; |
|
} |
|
|
|
.blocks-gallery-grid.aligncenter .blocks-gallery-item figure, |
|
.wp-block-gallery.aligncenter .blocks-gallery-item figure { |
|
justify-content: center; |
|
} |