diff options
Diffstat (limited to '')
-rw-r--r-- | wp-includes/blocks/gallery.php | 132 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/block.json | 139 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/editor-rtl.css | 147 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/editor-rtl.min.css | 1 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/editor.css | 147 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/editor.min.css | 1 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/style-rtl.css | 230 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/style-rtl.min.css | 1 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/style.css | 230 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/style.min.css | 1 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/theme-rtl.css | 8 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/theme-rtl.min.css | 1 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/theme.css | 8 | ||||
-rw-r--r-- | wp-includes/blocks/gallery/theme.min.css | 1 |
14 files changed, 1047 insertions, 0 deletions
diff --git a/wp-includes/blocks/gallery.php b/wp-includes/blocks/gallery.php new file mode 100644 index 0000000..edde9b4 --- /dev/null +++ b/wp-includes/blocks/gallery.php @@ -0,0 +1,132 @@ +<?php +/** + * Server-side rendering of the `core/gallery` block. + * + * @package WordPress + */ + +/** + * Handles backwards compatibility for Gallery Blocks, + * whose images feature a `data-id` attribute. + * + * Now that the Gallery Block contains inner Image Blocks, + * we add a custom `data-id` attribute before rendering the gallery + * so that the Image Block can pick it up in its render_callback. + * + * @param array $parsed_block The block being rendered. + * @return array The migrated block object. + */ +function block_core_gallery_data_id_backcompatibility( $parsed_block ) { + if ( 'core/gallery' === $parsed_block['blockName'] ) { + foreach ( $parsed_block['innerBlocks'] as $key => $inner_block ) { + if ( 'core/image' === $inner_block['blockName'] ) { + if ( ! isset( $parsed_block['innerBlocks'][ $key ]['attrs']['data-id'] ) && isset( $inner_block['attrs']['id'] ) ) { + $parsed_block['innerBlocks'][ $key ]['attrs']['data-id'] = esc_attr( $inner_block['attrs']['id'] ); + } + } + } + } + + return $parsed_block; +} + +add_filter( 'render_block_data', 'block_core_gallery_data_id_backcompatibility' ); + +/** + * Adds a style tag for the --wp--style--unstable-gallery-gap var. + * + * The Gallery block needs to recalculate Image block width based on + * the current gap setting in order to maintain the number of flex columns + * so a css var is added to allow this. + * + * @param array $attributes Attributes of the block being rendered. + * @param string $content Content of the block being rendered. + * @return string The content of the block being rendered. + */ +function block_core_gallery_render( $attributes, $content ) { + $gap = $attributes['style']['spacing']['blockGap'] ?? null; + // Skip if gap value contains unsupported characters. + // Regex for CSS value borrowed from `safecss_filter_attr`, and used here + // because we only want to match against the value, not the CSS attribute. + if ( is_array( $gap ) ) { + foreach ( $gap as $key => $value ) { + // Make sure $value is a string to avoid PHP 8.1 deprecation error in preg_match() when the value is null. + $value = is_string( $value ) ? $value : ''; + $value = $value && preg_match( '%[\\\(&=}]|/\*%', $value ) ? null : $value; + + // Get spacing CSS variable from preset value if provided. + if ( is_string( $value ) && str_contains( $value, 'var:preset|spacing|' ) ) { + $index_to_splice = strrpos( $value, '|' ) + 1; + $slug = _wp_to_kebab_case( substr( $value, $index_to_splice ) ); + $value = "var(--wp--preset--spacing--$slug)"; + } + + $gap[ $key ] = $value; + } + } else { + // Make sure $gap is a string to avoid PHP 8.1 deprecation error in preg_match() when the value is null. + $gap = is_string( $gap ) ? $gap : ''; + $gap = $gap && preg_match( '%[\\\(&=}]|/\*%', $gap ) ? null : $gap; + + // Get spacing CSS variable from preset value if provided. + if ( is_string( $gap ) && str_contains( $gap, 'var:preset|spacing|' ) ) { + $index_to_splice = strrpos( $gap, '|' ) + 1; + $slug = _wp_to_kebab_case( substr( $gap, $index_to_splice ) ); + $gap = "var(--wp--preset--spacing--$slug)"; + } + } + + $unique_gallery_classname = wp_unique_id( 'wp-block-gallery-' ); + $processed_content = new WP_HTML_Tag_Processor( $content ); + $processed_content->next_tag(); + $processed_content->add_class( $unique_gallery_classname ); + + // --gallery-block--gutter-size is deprecated. --wp--style--gallery-gap-default should be used by themes that want to set a default + // gap on the gallery. + $fallback_gap = 'var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )'; + $gap_value = $gap ? $gap : $fallback_gap; + $gap_column = $gap_value; + + if ( is_array( $gap_value ) ) { + $gap_row = isset( $gap_value['top'] ) ? $gap_value['top'] : $fallback_gap; + $gap_column = isset( $gap_value['left'] ) ? $gap_value['left'] : $fallback_gap; + $gap_value = $gap_row === $gap_column ? $gap_row : $gap_row . ' ' . $gap_column; + } + + // The unstable gallery gap calculation requires a real value (such as `0px`) and not `0`. + if ( '0' === $gap_column ) { + $gap_column = '0px'; + } + + // Set the CSS variable to the column value, and the `gap` property to the combined gap value. + $gallery_styles = array( + array( + 'selector' => ".wp-block-gallery.{$unique_gallery_classname}", + 'declarations' => array( + '--wp--style--unstable-gallery-gap' => $gap_column, + 'gap' => $gap_value, + ), + ), + ); + + wp_style_engine_get_stylesheet_from_css_rules( + $gallery_styles, + array( + 'context' => 'block-supports', + ) + ); + return (string) $processed_content; +} +/** + * Registers the `core/gallery` block on server. + */ +function register_block_core_gallery() { + register_block_type_from_metadata( + __DIR__ . '/gallery', + array( + 'render_callback' => 'block_core_gallery_render', + ) + ); +} + +add_action( 'init', 'register_block_core_gallery' ); diff --git a/wp-includes/blocks/gallery/block.json b/wp-includes/blocks/gallery/block.json new file mode 100644 index 0000000..0867989 --- /dev/null +++ b/wp-includes/blocks/gallery/block.json @@ -0,0 +1,139 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "core/gallery", + "title": "Gallery", + "category": "media", + "description": "Display multiple images in a rich gallery.", + "keywords": [ "images", "photos" ], + "textdomain": "default", + "attributes": { + "images": { + "type": "array", + "default": [], + "source": "query", + "selector": ".blocks-gallery-item", + "query": { + "url": { + "type": "string", + "source": "attribute", + "selector": "img", + "attribute": "src" + }, + "fullUrl": { + "type": "string", + "source": "attribute", + "selector": "img", + "attribute": "data-full-url" + }, + "link": { + "type": "string", + "source": "attribute", + "selector": "img", + "attribute": "data-link" + }, + "alt": { + "type": "string", + "source": "attribute", + "selector": "img", + "attribute": "alt", + "default": "" + }, + "id": { + "type": "string", + "source": "attribute", + "selector": "img", + "attribute": "data-id" + }, + "caption": { + "type": "string", + "source": "html", + "selector": ".blocks-gallery-item__caption" + } + } + }, + "ids": { + "type": "array", + "items": { + "type": "number" + }, + "default": [] + }, + "shortCodeTransforms": { + "type": "array", + "items": { + "type": "object" + }, + "default": [] + }, + "columns": { + "type": "number", + "minimum": 1, + "maximum": 8 + }, + "caption": { + "type": "string", + "source": "html", + "selector": ".blocks-gallery-caption" + }, + "imageCrop": { + "type": "boolean", + "default": true + }, + "fixedHeight": { + "type": "boolean", + "default": true + }, + "linkTarget": { + "type": "string" + }, + "linkTo": { + "type": "string" + }, + "sizeSlug": { + "type": "string", + "default": "large" + }, + "allowResize": { + "type": "boolean", + "default": false + } + }, + "providesContext": { + "allowResize": "allowResize", + "imageCrop": "imageCrop", + "fixedHeight": "fixedHeight" + }, + "supports": { + "anchor": true, + "align": true, + "html": false, + "units": [ "px", "em", "rem", "vh", "vw" ], + "spacing": { + "margin": true, + "padding": true, + "blockGap": [ "horizontal", "vertical" ], + "__experimentalSkipSerialization": [ "blockGap" ], + "__experimentalDefaultControls": { + "blockGap": true, + "margin": false, + "padding": false + } + }, + "color": { + "text": false, + "background": true, + "gradients": true + }, + "layout": { + "allowSwitching": false, + "allowInheriting": false, + "allowEditing": false, + "default": { + "type": "flex" + } + } + }, + "editorStyle": "wp-block-gallery-editor", + "style": "wp-block-gallery" +} diff --git a/wp-includes/blocks/gallery/editor-rtl.css b/wp-includes/blocks/gallery/editor-rtl.css new file mode 100644 index 0000000..1995473 --- /dev/null +++ b/wp-includes/blocks/gallery/editor-rtl.css @@ -0,0 +1,147 @@ +figure.wp-block-gallery{ + display:block; +} +figure.wp-block-gallery>.blocks-gallery-caption{ + flex:0 0 100%; +} +figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{ + flex-basis:100%; +} +figure.wp-block-gallery .wp-block-image .components-notice.is-error{ + display:block; +} +figure.wp-block-gallery .wp-block-image .components-notice__content{ + margin:4px 0; +} +figure.wp-block-gallery .wp-block-image .components-notice__dismiss{ + left:5px; + position:absolute; + top:0; +} +figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{ + display:none; +} +figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{ + margin-bottom:0; +} +figure.wp-block-gallery .block-editor-media-placeholder{ + margin:0; +} +figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{ + display:flex; +} +figure.wp-block-gallery .block-editor-media-placeholder figcaption{ + z-index:2; +} +figure.wp-block-gallery .components-spinner{ + margin-right:-9px; + margin-top:-9px; + position:absolute; + right:50%; + top:50%; +} +.gallery-settings-buttons .components-button:first-child{ + margin-left:8px; +} + +.gallery-image-sizes .components-base-control__label{ + display:block; + margin-bottom:4px; +} +.gallery-image-sizes .gallery-image-sizes__loading{ + align-items:center; + color:#757575; + display:flex; + font-size:12px; +} +.gallery-image-sizes .components-spinner{ + margin:0 4px 0 8px; +} +.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{ + outline:none; +} +.blocks-gallery-item figure.is-selected:before{ + bottom:0; + box-shadow:0 0 0 1px #fff inset, 0 0 0 3px var(--wp-admin-theme-color) inset; + content:""; + left:0; + outline:2px solid transparent; + pointer-events:none; + position:absolute; + right:0; + top:0; + z-index:1; +} +.blocks-gallery-item figure.is-transient img{ + opacity:.3; +} +.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{ + display:inline-flex; +} +.blocks-gallery-item .block-editor-media-placeholder{ + height:100%; + margin:0; +} +.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{ + display:flex; +} + +.block-library-gallery-item__inline-menu{ + background:#fff; + border:1px solid #1e1e1e; + border-radius:2px; + display:none; + margin:8px; + position:absolute; + top:-2px; + transition:box-shadow .2s ease-out; + z-index:20; +} +@media (prefers-reduced-motion:reduce){ + .block-library-gallery-item__inline-menu{ + transition-delay:0s; + transition-duration:0s; + } +} +.block-library-gallery-item__inline-menu:hover{ + box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1); +} +@media (min-width:600px){ + .columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{ + padding:2px; + } +} +.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){ + border:none; + box-shadow:none; +} +@media (min-width:600px){ + .columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{ + height:inherit; + padding:0; + width:inherit; + } +} +.block-library-gallery-item__inline-menu.is-left{ + right:-2px; +} +.block-library-gallery-item__inline-menu.is-right{ + left:-2px; +} + +.wp-block-gallery ul.blocks-gallery-grid{ + margin:0; + padding:0; +} + +@media (min-width:600px){ + .wp-block-update-gallery-modal{ + max-width:480px; + } +} + +.wp-block-update-gallery-modal-buttons{ + display:flex; + gap:12px; + justify-content:flex-end; +}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/editor-rtl.min.css b/wp-includes/blocks/gallery/editor-rtl.min.css new file mode 100644 index 0000000..4129abb --- /dev/null +++ b/wp-includes/blocks/gallery/editor-rtl.min.css @@ -0,0 +1 @@ +figure.wp-block-gallery{display:block}figure.wp-block-gallery>.blocks-gallery-caption{flex:0 0 100%}figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}figure.wp-block-gallery .wp-block-image .components-notice.is-error{display:block}figure.wp-block-gallery .wp-block-image .components-notice__content{margin:4px 0}figure.wp-block-gallery .wp-block-image .components-notice__dismiss{left:5px;position:absolute;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.gallery-settings-buttons .components-button:first-child{margin-left:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 4px 0 8px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid transparent;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1)}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{right:-2px}.block-library-gallery-item__inline-menu.is-right{left:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/editor.css b/wp-includes/blocks/gallery/editor.css new file mode 100644 index 0000000..b8493cb --- /dev/null +++ b/wp-includes/blocks/gallery/editor.css @@ -0,0 +1,147 @@ +figure.wp-block-gallery{ + display:block; +} +figure.wp-block-gallery>.blocks-gallery-caption{ + flex:0 0 100%; +} +figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{ + flex-basis:100%; +} +figure.wp-block-gallery .wp-block-image .components-notice.is-error{ + display:block; +} +figure.wp-block-gallery .wp-block-image .components-notice__content{ + margin:4px 0; +} +figure.wp-block-gallery .wp-block-image .components-notice__dismiss{ + position:absolute; + right:5px; + top:0; +} +figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{ + display:none; +} +figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{ + margin-bottom:0; +} +figure.wp-block-gallery .block-editor-media-placeholder{ + margin:0; +} +figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{ + display:flex; +} +figure.wp-block-gallery .block-editor-media-placeholder figcaption{ + z-index:2; +} +figure.wp-block-gallery .components-spinner{ + left:50%; + margin-left:-9px; + margin-top:-9px; + position:absolute; + top:50%; +} +.gallery-settings-buttons .components-button:first-child{ + margin-right:8px; +} + +.gallery-image-sizes .components-base-control__label{ + display:block; + margin-bottom:4px; +} +.gallery-image-sizes .gallery-image-sizes__loading{ + align-items:center; + color:#757575; + display:flex; + font-size:12px; +} +.gallery-image-sizes .components-spinner{ + margin:0 8px 0 4px; +} +.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{ + outline:none; +} +.blocks-gallery-item figure.is-selected:before{ + bottom:0; + box-shadow:0 0 0 1px #fff inset, 0 0 0 3px var(--wp-admin-theme-color) inset; + content:""; + left:0; + outline:2px solid transparent; + pointer-events:none; + position:absolute; + right:0; + top:0; + z-index:1; +} +.blocks-gallery-item figure.is-transient img{ + opacity:.3; +} +.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{ + display:inline-flex; +} +.blocks-gallery-item .block-editor-media-placeholder{ + height:100%; + margin:0; +} +.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{ + display:flex; +} + +.block-library-gallery-item__inline-menu{ + background:#fff; + border:1px solid #1e1e1e; + border-radius:2px; + display:none; + margin:8px; + position:absolute; + top:-2px; + transition:box-shadow .2s ease-out; + z-index:20; +} +@media (prefers-reduced-motion:reduce){ + .block-library-gallery-item__inline-menu{ + transition-delay:0s; + transition-duration:0s; + } +} +.block-library-gallery-item__inline-menu:hover{ + box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1); +} +@media (min-width:600px){ + .columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{ + padding:2px; + } +} +.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){ + border:none; + box-shadow:none; +} +@media (min-width:600px){ + .columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{ + height:inherit; + padding:0; + width:inherit; + } +} +.block-library-gallery-item__inline-menu.is-left{ + left:-2px; +} +.block-library-gallery-item__inline-menu.is-right{ + right:-2px; +} + +.wp-block-gallery ul.blocks-gallery-grid{ + margin:0; + padding:0; +} + +@media (min-width:600px){ + .wp-block-update-gallery-modal{ + max-width:480px; + } +} + +.wp-block-update-gallery-modal-buttons{ + display:flex; + gap:12px; + justify-content:flex-end; +}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/editor.min.css b/wp-includes/blocks/gallery/editor.min.css new file mode 100644 index 0000000..35550e9 --- /dev/null +++ b/wp-includes/blocks/gallery/editor.min.css @@ -0,0 +1 @@ +figure.wp-block-gallery{display:block}figure.wp-block-gallery>.blocks-gallery-caption{flex:0 0 100%}figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}figure.wp-block-gallery .wp-block-image .components-notice.is-error{display:block}figure.wp-block-gallery .wp-block-image .components-notice__content{margin:4px 0}figure.wp-block-gallery .wp-block-image .components-notice__dismiss{position:absolute;right:5px;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.gallery-settings-buttons .components-button:first-child{margin-right:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 8px 0 4px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid transparent;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1)}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{left:-2px}.block-library-gallery-item__inline-menu.is-right{right:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/style-rtl.css b/wp-includes/blocks/gallery/style-rtl.css new file mode 100644 index 0000000..bbfa0b0 --- /dev/null +++ b/wp-includes/blocks/gallery/style-rtl.css @@ -0,0 +1,230 @@ +.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){ + display:flex; + flex-wrap:wrap; + list-style-type:none; + margin:0; + padding:0; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{ + display:flex; + flex-direction:column; + flex-grow:1; + justify-content:center; + margin:0 0 1em 1em; + position:relative; + width:calc(50% - 1em); +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){ + margin-left:0; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{ + align-items:flex-end; + display:flex; + height:100%; + justify-content:flex-start; + margin:0; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{ + display:block; + height:auto; + max-width:100%; + width:auto; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{ + background:linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.3) 70%, transparent); + bottom:0; + box-sizing:border-box; + color:#fff; + font-size:.8em; + margin:0; + max-height:100%; + overflow:auto; + padding:3em .77em .7em; + position:absolute; + text-align:center; + width:100%; + z-index:2; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{ + display:inline; +} +.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{ + flex-grow:1; +} +.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{ + flex:1; + height:100%; + object-fit:cover; + width:100%; +} +.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{ + margin-left:0; + width:100%; +} +@media (min-width:600px){ + .blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{ + margin-left:1em; + width:calc(33.33333% - .66667em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{ + margin-left:1em; + width:calc(25% - .75em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{ + margin-left:1em; + width:calc(20% - .8em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{ + margin-left:1em; + width:calc(16.66667% - .83333em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{ + margin-left:1em; + width:calc(14.28571% - .85714em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{ + margin-left:1em; + width:calc(12.5% - .875em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){ + margin-left:0; + } +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{ + margin-left:0; +} +.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{ + max-width:420px; + width:100%; +} +.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{ + justify-content:center; +} + +.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{ + align-self:flex-start; +} + +figure.wp-block-gallery.has-nested-images{ + align-items:normal; +} + +.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){ + margin:0; + width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2); +} +.wp-block-gallery.has-nested-images figure.wp-block-image{ + box-sizing:border-box; + display:flex; + flex-direction:column; + flex-grow:1; + justify-content:center; + max-width:100%; + position:relative; +} +.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{ + flex-direction:column; + flex-grow:1; + margin:0; +} +.wp-block-gallery.has-nested-images figure.wp-block-image img{ + display:block; + height:auto; + max-width:100% !important; + width:auto; +} +.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{ + background:linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.3) 70%, transparent); + bottom:0; + box-sizing:border-box; + color:#fff; + font-size:13px; + margin-bottom:0; + max-height:60%; + overflow:auto; + padding:0 8px 8px; + position:absolute; + right:0; + text-align:center; + width:100%; +} +.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{ + display:inline; +} +.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{ + color:inherit; +} +.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{ + box-sizing:border-box; +} +.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{ + flex:1 1 auto; +} +.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{ + background:none; + color:inherit; + flex:initial; + margin:0; + padding:10px 10px 9px; + position:relative; +} +.wp-block-gallery.has-nested-images figcaption{ + flex-basis:100%; + flex-grow:1; + text-align:center; +} +.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){ + margin-bottom:auto; + margin-top:0; +} +.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){ + align-self:inherit; +} +.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){ + display:flex; +} +.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{ + flex:1 0 0%; + height:100%; + object-fit:cover; + width:100%; +} +.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){ + width:100%; +} +@media (min-width:600px){ + .wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){ + width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667); + } + .wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){ + width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75); + } + .wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){ + width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8); + } + .wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){ + width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333); + } + .wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){ + width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714); + } + .wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){ + width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875); + } + .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){ + width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667); + } + .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){ + width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5); + } + .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{ + width:100%; + } +} +.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{ + max-width:420px; + width:100%; +} +.wp-block-gallery.has-nested-images.aligncenter{ + justify-content:center; +}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/style-rtl.min.css b/wp-includes/blocks/gallery/style-rtl.min.css new file mode 100644 index 0000000..ec4c42e --- /dev/null +++ b/wp-includes/blocks/gallery/style-rtl.min.css @@ -0,0 +1 @@ +.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0 0 1em 1em;position:relative;width:calc(50% - 1em)}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){margin-left:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{align-items:flex-end;display:flex;height:100%;justify-content:flex-start;margin:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{display:block;height:auto;max-width:100%;width:auto}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{background:linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.3) 70%,transparent);bottom:0;box-sizing:border-box;color:#fff;font-size:.8em;margin:0;max-height:100%;overflow:auto;padding:3em .77em .7em;position:absolute;text-align:center;width:100%;z-index:2}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{display:inline}.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{flex-grow:1}.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{flex:1;height:100%;object-fit:cover;width:100%}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{margin-left:0;width:100%}@media (min-width:600px){.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{margin-left:1em;width:calc(33.33333% - .66667em)}.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{margin-left:1em;width:calc(25% - .75em)}.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{margin-left:1em;width:calc(20% - .8em)}.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{margin-left:1em;width:calc(16.66667% - .83333em)}.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{margin-left:1em;width:calc(14.28571% - .85714em)}.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{margin-left:1em;width:calc(12.5% - .875em)}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){margin-left:0}}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{margin-left:0}.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{max-width:420px;width:100%}.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{justify-content:center}.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{align-self:flex-start}figure.wp-block-gallery.has-nested-images{align-items:normal}.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){margin:0;width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2)}.wp-block-gallery.has-nested-images figure.wp-block-image{box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;max-width:100%;position:relative}.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{flex-direction:column;flex-grow:1;margin:0}.wp-block-gallery.has-nested-images figure.wp-block-image img{display:block;height:auto;max-width:100%!important;width:auto}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{background:linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.3) 70%,transparent);bottom:0;box-sizing:border-box;color:#fff;font-size:13px;margin-bottom:0;max-height:60%;overflow:auto;padding:0 8px 8px;position:absolute;right:0;text-align:center;width:100%}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{display:inline}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{color:inherit}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{flex:1 1 auto}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{background:none;color:inherit;flex:initial;margin:0;padding:10px 10px 9px;position:relative}.wp-block-gallery.has-nested-images figcaption{flex-basis:100%;flex-grow:1;text-align:center}.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){margin-bottom:auto;margin-top:0}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){align-self:inherit}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){display:flex}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{flex:1 0 0%;height:100%;object-fit:cover;width:100%}.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){width:100%}@media (min-width:600px){.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75)}.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8)}.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333)}.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714)}.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{width:100%}}.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{max-width:420px;width:100%}.wp-block-gallery.has-nested-images.aligncenter{justify-content:center}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/style.css b/wp-includes/blocks/gallery/style.css new file mode 100644 index 0000000..fb2a073 --- /dev/null +++ b/wp-includes/blocks/gallery/style.css @@ -0,0 +1,230 @@ +.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){ + display:flex; + flex-wrap:wrap; + list-style-type:none; + margin:0; + padding:0; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{ + display:flex; + flex-direction:column; + flex-grow:1; + justify-content:center; + margin:0 1em 1em 0; + position:relative; + width:calc(50% - 1em); +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){ + margin-right:0; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{ + align-items:flex-end; + display:flex; + height:100%; + justify-content:flex-start; + margin:0; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{ + display:block; + height:auto; + max-width:100%; + width:auto; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{ + background:linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.3) 70%, transparent); + bottom:0; + box-sizing:border-box; + color:#fff; + font-size:.8em; + margin:0; + max-height:100%; + overflow:auto; + padding:3em .77em .7em; + position:absolute; + text-align:center; + width:100%; + z-index:2; +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{ + display:inline; +} +.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{ + flex-grow:1; +} +.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{ + flex:1; + height:100%; + object-fit:cover; + width:100%; +} +.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{ + margin-right:0; + width:100%; +} +@media (min-width:600px){ + .blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{ + margin-right:1em; + width:calc(33.33333% - .66667em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{ + margin-right:1em; + width:calc(25% - .75em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{ + margin-right:1em; + width:calc(20% - .8em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{ + margin-right:1em; + width:calc(16.66667% - .83333em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{ + margin-right:1em; + width:calc(14.28571% - .85714em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{ + margin-right:1em; + width:calc(12.5% - .875em); + } + .blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){ + margin-right:0; + } +} +.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{ + margin-right:0; +} +.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{ + max-width:420px; + width:100%; +} +.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{ + justify-content:center; +} + +.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{ + align-self:flex-start; +} + +figure.wp-block-gallery.has-nested-images{ + align-items:normal; +} + +.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){ + margin:0; + width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2); +} +.wp-block-gallery.has-nested-images figure.wp-block-image{ + box-sizing:border-box; + display:flex; + flex-direction:column; + flex-grow:1; + justify-content:center; + max-width:100%; + position:relative; +} +.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{ + flex-direction:column; + flex-grow:1; + margin:0; +} +.wp-block-gallery.has-nested-images figure.wp-block-image img{ + display:block; + height:auto; + max-width:100% !important; + width:auto; +} +.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{ + background:linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.3) 70%, transparent); + bottom:0; + box-sizing:border-box; + color:#fff; + font-size:13px; + left:0; + margin-bottom:0; + max-height:60%; + overflow:auto; + padding:0 8px 8px; + position:absolute; + text-align:center; + width:100%; +} +.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{ + display:inline; +} +.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{ + color:inherit; +} +.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{ + box-sizing:border-box; +} +.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{ + flex:1 1 auto; +} +.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{ + background:none; + color:inherit; + flex:initial; + margin:0; + padding:10px 10px 9px; + position:relative; +} +.wp-block-gallery.has-nested-images figcaption{ + flex-basis:100%; + flex-grow:1; + text-align:center; +} +.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){ + margin-bottom:auto; + margin-top:0; +} +.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){ + align-self:inherit; +} +.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){ + display:flex; +} +.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{ + flex:1 0 0%; + height:100%; + object-fit:cover; + width:100%; +} +.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){ + width:100%; +} +@media (min-width:600px){ + .wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){ + width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667); + } + .wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){ + width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75); + } + .wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){ + width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8); + } + .wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){ + width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333); + } + .wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){ + width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714); + } + .wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){ + width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875); + } + .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){ + width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667); + } + .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){ + width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5); + } + .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{ + width:100%; + } +} +.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{ + max-width:420px; + width:100%; +} +.wp-block-gallery.has-nested-images.aligncenter{ + justify-content:center; +}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/style.min.css b/wp-includes/blocks/gallery/style.min.css new file mode 100644 index 0000000..a5ab123 --- /dev/null +++ b/wp-includes/blocks/gallery/style.min.css @@ -0,0 +1 @@ +.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0 1em 1em 0;position:relative;width:calc(50% - 1em)}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){margin-right:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{align-items:flex-end;display:flex;height:100%;justify-content:flex-start;margin:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{display:block;height:auto;max-width:100%;width:auto}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{background:linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.3) 70%,transparent);bottom:0;box-sizing:border-box;color:#fff;font-size:.8em;margin:0;max-height:100%;overflow:auto;padding:3em .77em .7em;position:absolute;text-align:center;width:100%;z-index:2}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{display:inline}.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{flex-grow:1}.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{flex:1;height:100%;object-fit:cover;width:100%}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{margin-right:0;width:100%}@media (min-width:600px){.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{margin-right:1em;width:calc(33.33333% - .66667em)}.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{margin-right:1em;width:calc(25% - .75em)}.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{margin-right:1em;width:calc(20% - .8em)}.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{margin-right:1em;width:calc(16.66667% - .83333em)}.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{margin-right:1em;width:calc(14.28571% - .85714em)}.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{margin-right:1em;width:calc(12.5% - .875em)}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){margin-right:0}}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{margin-right:0}.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{max-width:420px;width:100%}.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{justify-content:center}.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{align-self:flex-start}figure.wp-block-gallery.has-nested-images{align-items:normal}.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){margin:0;width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2)}.wp-block-gallery.has-nested-images figure.wp-block-image{box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;max-width:100%;position:relative}.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{flex-direction:column;flex-grow:1;margin:0}.wp-block-gallery.has-nested-images figure.wp-block-image img{display:block;height:auto;max-width:100%!important;width:auto}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{background:linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.3) 70%,transparent);bottom:0;box-sizing:border-box;color:#fff;font-size:13px;left:0;margin-bottom:0;max-height:60%;overflow:auto;padding:0 8px 8px;position:absolute;text-align:center;width:100%}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{display:inline}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{color:inherit}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{flex:1 1 auto}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{background:none;color:inherit;flex:initial;margin:0;padding:10px 10px 9px;position:relative}.wp-block-gallery.has-nested-images figcaption{flex-basis:100%;flex-grow:1;text-align:center}.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){margin-bottom:auto;margin-top:0}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){align-self:inherit}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){display:flex}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{flex:1 0 0%;height:100%;object-fit:cover;width:100%}.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){width:100%}@media (min-width:600px){.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75)}.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8)}.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333)}.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714)}.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{width:100%}}.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{max-width:420px;width:100%}.wp-block-gallery.has-nested-images.aligncenter{justify-content:center}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/theme-rtl.css b/wp-includes/blocks/gallery/theme-rtl.css new file mode 100644 index 0000000..94a485a --- /dev/null +++ b/wp-includes/blocks/gallery/theme-rtl.css @@ -0,0 +1,8 @@ +.blocks-gallery-caption{ + color:#555; + font-size:13px; + text-align:center; +} +.is-dark-theme .blocks-gallery-caption{ + color:hsla(0,0%,100%,.65); +}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/theme-rtl.min.css b/wp-includes/blocks/gallery/theme-rtl.min.css new file mode 100644 index 0000000..fe8cd6a --- /dev/null +++ b/wp-includes/blocks/gallery/theme-rtl.min.css @@ -0,0 +1 @@ +.blocks-gallery-caption{color:#555;font-size:13px;text-align:center}.is-dark-theme .blocks-gallery-caption{color:hsla(0,0%,100%,.65)}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/theme.css b/wp-includes/blocks/gallery/theme.css new file mode 100644 index 0000000..94a485a --- /dev/null +++ b/wp-includes/blocks/gallery/theme.css @@ -0,0 +1,8 @@ +.blocks-gallery-caption{ + color:#555; + font-size:13px; + text-align:center; +} +.is-dark-theme .blocks-gallery-caption{ + color:hsla(0,0%,100%,.65); +}
\ No newline at end of file diff --git a/wp-includes/blocks/gallery/theme.min.css b/wp-includes/blocks/gallery/theme.min.css new file mode 100644 index 0000000..fe8cd6a --- /dev/null +++ b/wp-includes/blocks/gallery/theme.min.css @@ -0,0 +1 @@ +.blocks-gallery-caption{color:#555;font-size:13px;text-align:center}.is-dark-theme .blocks-gallery-caption{color:hsla(0,0%,100%,.65)}
\ No newline at end of file |