Block Editor: Update the WordPress Packages based on Gutenberg 11.9 RC1.

This brings the JS packages up to date and is the first step that will allow us 
to include the other block editor updates for WordPress 5.9:
FSE infrastrucutre, site editor and global styles.

Props noisysocks.
See #54337.

Built from https://develop.svn.wordpress.org/trunk@52042


git-svn-id: http://core.svn.wordpress.org/trunk@51634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
youknowriad 2021-11-08 14:29:21 +00:00
parent 0b4ecc9b23
commit ebca9841e8
513 changed files with 123775 additions and 95542 deletions

File diff suppressed because one or more lines are too long

View File

@ -187,10 +187,22 @@ function get_default_block_editor_settings() {
} }
} }
// These styles are used if the "no theme styles" options is triggered or on
// themes without their own editor styles.
$default_editor_styles_file = ABSPATH . WPINC . '/css/dist/block-editor/default-editor-styles.css';
if ( file_exists( $default_editor_styles_file ) ) {
$default_editor_styles = array(
array( 'css' => file_get_contents( $default_editor_styles_file ) ),
);
} else {
$default_editor_styles = array();
}
$editor_settings = array( $editor_settings = array(
'alignWide' => get_theme_support( 'align-wide' ), 'alignWide' => get_theme_support( 'align-wide' ),
'allowedBlockTypes' => true, 'allowedBlockTypes' => true,
'allowedMimeTypes' => get_allowed_mime_types(), 'allowedMimeTypes' => get_allowed_mime_types(),
'defaultEditorStyles' => $default_editor_styles,
'blockCategories' => get_default_block_categories(), 'blockCategories' => get_default_block_categories(),
'disableCustomColors' => get_theme_support( 'disable-custom-colors' ), 'disableCustomColors' => get_theme_support( 'disable-custom-colors' ),
'disableCustomFontSizes' => get_theme_support( 'disable-custom-font-sizes' ), 'disableCustomFontSizes' => get_theme_support( 'disable-custom-font-sizes' ),
@ -464,22 +476,12 @@ function block_editor_rest_api_preload( array $preload_paths, $block_editor_cont
* *
* @global array $editor_styles * @global array $editor_styles
* *
* @return array An array of theme styles for the block editor. Includes default font family * @return array An array of theme styles for the block editor.
* style and theme stylesheets.
*/ */
function get_block_editor_theme_styles() { function get_block_editor_theme_styles() {
global $editor_styles; global $editor_styles;
if ( ! WP_Theme_JSON_Resolver::theme_has_support() ) { $styles = array();
$styles = array(
array(
'css' => 'body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif }',
'__unstableType' => 'core',
),
);
} else {
$styles = array();
}
if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) { if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) {
foreach ( $editor_styles as $style ) { foreach ( $editor_styles as $style ) {

View File

@ -40,6 +40,10 @@ function render_block_core_archives( $attributes ) {
$archives = wp_get_archives( $dropdown_args ); $archives = wp_get_archives( $dropdown_args );
$classnames = esc_attr( $class );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) );
switch ( $dropdown_args['type'] ) { switch ( $dropdown_args['type'] ) {
case 'yearly': case 'yearly':
$label = __( 'Select Year' ); $label = __( 'Select Year' );
@ -60,13 +64,13 @@ function render_block_core_archives( $attributes ) {
$label = esc_html( $label ); $label = esc_html( $label );
$block_content = '<label class="screen-reader-text" for="' . $dropdown_id . '">' . $title . '</label> $block_content = '<label for="' . $dropdown_id . '">' . $title . '</label>
<select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"> <select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value="">' . $label . '</option>' . $archives . '</select>'; <option value="">' . $label . '</option>' . $archives . '</select>';
return sprintf( return sprintf(
'<div class="%1$s">%2$s</div>', '<div %1$s>%2$s</div>',
esc_attr( $class ), $wrapper_attributes,
$block_content $block_content
); );
} }

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,13 +74,6 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-post-content__placeholder { .wp-block-archives-dropdown label {
height: 100px; display: block;
border: 1px dashed;
display: flex;
justify-content: center;
align-items: center;
}
.wp-block-post-content__placeholder span {
font-style: italic;
} }

View File

@ -0,0 +1 @@
.wp-block-archives-dropdown label{display:block}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,7 +74,6 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-query-title__placeholder { .wp-block-archives-dropdown label {
padding: 1em 0; display: block;
border: 1px dashed;
} }

View File

@ -0,0 +1 @@
.wp-block-archives-dropdown label{display:block}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -0,0 +1,84 @@
/**
* Colors
*/
/**
* Breakpoints & Media Queries
*/
/**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Dimensions.
*/
/**
* Shadows.
*/
/**
* Editor widths.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Breakpoint mixins
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-audio figcaption {
color: #555;
font-size: 13px;
text-align: center;
}
.is-dark-theme .wp-block-audio figcaption {
color: rgba(255, 255, 255, 0.65);
}

View File

@ -0,0 +1 @@
.wp-block-audio figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio figcaption{color:hsla(0,0%,100%,.65)}

View File

@ -0,0 +1,84 @@
/**
* Colors
*/
/**
* Breakpoints & Media Queries
*/
/**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Dimensions.
*/
/**
* Shadows.
*/
/**
* Editor widths.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Breakpoint mixins
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-audio figcaption {
color: #555;
font-size: 13px;
text-align: center;
}
.is-dark-theme .wp-block-audio figcaption {
color: rgba(255, 255, 255, 0.65);
}

View File

@ -0,0 +1 @@
.wp-block-audio figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio figcaption{color:hsla(0,0%,100%,.65)}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -63,9 +63,19 @@
}, },
"typography": { "typography": {
"fontSize": true, "fontSize": true,
"__experimentalFontFamily": true "__experimentalFontFamily": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}, },
"reusable": false, "reusable": false,
"spacing": {
"__experimentalSkipSerialization": true,
"padding": [ "horizontal", "vertical" ],
"__experimentalDefaultControls": {
"padding": true
}
},
"__experimentalBorder": { "__experimentalBorder": {
"radius": true, "radius": true,
"__experimentalSkipSerialization": true "__experimentalSkipSerialization": true

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -122,7 +128,6 @@
.is-selected .wp-block-button__inline-link { .is-selected .wp-block-button__inline-link {
height: auto; height: auto;
overflow: visible; overflow: visible;
margin-top: 16px;
} }
.wp-button-label__width .components-button-group { .wp-button-label__width .components-button-group {

View File

@ -1 +1 @@
.wp-block[data-align=center]>.wp-block-button{text-align:center;margin-right:auto;margin-left:auto}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{position:relative;cursor:text}.wp-block-button:not(.has-text-color):not(.is-style-outline) [data-rich-text-placeholder]:after{color:#fff}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}.wp-block-button__inline-link{color:#757575;height:0;overflow:hidden;max-width:290px}.wp-block-button__inline-link-input__suggestions{max-width:290px}@media (min-width:782px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:260px}}@media (min-width:960px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:290px}}.is-selected .wp-block-button__inline-link{height:auto;overflow:visible;margin-top:16px}.wp-button-label__width .components-button-group{display:block}.wp-button-label__width .components-base-control__field{margin-bottom:12px}div[data-type="core/button"]{display:table} .wp-block[data-align=center]>.wp-block-button{text-align:center;margin-right:auto;margin-left:auto}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{position:relative;cursor:text}.wp-block-button:not(.has-text-color):not(.is-style-outline) [data-rich-text-placeholder]:after{color:#fff}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}.wp-block-button__inline-link{color:#757575;height:0;overflow:hidden;max-width:290px}.wp-block-button__inline-link-input__suggestions{max-width:290px}@media (min-width:782px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:260px}}@media (min-width:960px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:290px}}.is-selected .wp-block-button__inline-link{height:auto;overflow:visible}.wp-button-label__width .components-button-group{display:block}.wp-button-label__width .components-base-control__field{margin-bottom:12px}div[data-type="core/button"]{display:table}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -123,7 +129,6 @@
.is-selected .wp-block-button__inline-link { .is-selected .wp-block-button__inline-link {
height: auto; height: auto;
overflow: visible; overflow: visible;
margin-top: 16px;
} }
.wp-button-label__width .components-button-group { .wp-button-label__width .components-button-group {

View File

@ -1,2 +1,2 @@
.wp-block[data-align=center]>.wp-block-button{text-align:center;margin-left:auto;margin-right:auto}.wp-block[data-align=right]>.wp-block-button{ .wp-block[data-align=center]>.wp-block-button{text-align:center;margin-left:auto;margin-right:auto}.wp-block[data-align=right]>.wp-block-button{
/*!rtl:ignore*/text-align:right}.wp-block-button{position:relative;cursor:text}.wp-block-button:not(.has-text-color):not(.is-style-outline) [data-rich-text-placeholder]:after{color:#fff}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}.wp-block-button__inline-link{color:#757575;height:0;overflow:hidden;max-width:290px}.wp-block-button__inline-link-input__suggestions{max-width:290px}@media (min-width:782px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:260px}}@media (min-width:960px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:290px}}.is-selected .wp-block-button__inline-link{height:auto;overflow:visible;margin-top:16px}.wp-button-label__width .components-button-group{display:block}.wp-button-label__width .components-base-control__field{margin-bottom:12px}div[data-type="core/button"]{display:table} /*!rtl:ignore*/text-align:right}.wp-block-button{position:relative;cursor:text}.wp-block-button:not(.has-text-color):not(.is-style-outline) [data-rich-text-placeholder]:after{color:#fff}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}.wp-block-button__inline-link{color:#757575;height:0;overflow:hidden;max-width:290px}.wp-block-button__inline-link-input__suggestions{max-width:290px}@media (min-width:782px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:260px}}@media (min-width:960px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:290px}}.is-selected .wp-block-button__inline-link{height:auto;overflow:visible}.wp-button-label__width .components-button-group{display:block}.wp-button-label__width .components-base-control__field{margin-bottom:12px}div[data-type="core/button"]{display:table}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -79,7 +85,7 @@
padding: calc(0.667em + 2px) calc(1.333em + 2px); padding: calc(0.667em + 2px) calc(1.333em + 2px);
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
overflow-wrap: break-word; word-break: break-word;
box-sizing: border-box; box-sizing: border-box;
} }
.wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, .wp-block-button__link:visited { .wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, .wp-block-button__link:visited {
@ -102,41 +108,29 @@
font-size: inherit; font-size: inherit;
} }
.wp-block-buttons > .wp-block-button.wp-block-button__width-25 { .wp-block-buttons > .wp-block-button.wp-block-button__width-25 {
width: calc(25% - 0.5em); width: calc(25% - (var(--wp--style--block-gap, 0.5em) * 0.75));
} }
.wp-block-buttons > .wp-block-button.wp-block-button__width-50 { .wp-block-buttons > .wp-block-button.wp-block-button__width-50 {
width: calc(50% - 0.5em); width: calc(50% - (var(--wp--style--block-gap, 0.5em) * 0.5));
} }
.wp-block-buttons > .wp-block-button.wp-block-button__width-75 { .wp-block-buttons > .wp-block-button.wp-block-button__width-75 {
width: calc(75% - 0.5em); width: calc(75% - (var(--wp--style--block-gap, 0.5em) * 0.25));
} }
.wp-block-buttons > .wp-block-button.wp-block-button__width-100 { .wp-block-buttons > .wp-block-button.wp-block-button__width-100 {
width: calc(100% - 0.5em);
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-100:only-child {
margin-left: 0;
width: 100%; width: 100%;
flex-basis: 100%;
} }
@supports (column-gap: 0.5em) { .wp-block-buttons.is-vertical > .wp-block-button.wp-block-button__width-25 {
.wp-block-buttons > .wp-block-button.wp-block-button, .wp-block-buttons.is-content-justification-right > .wp-block-button.wp-block-button { width: 25%;
margin-left: 0;
margin-right: 0;
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-25 {
width: calc(25% - 0.375em);
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-50 {
width: calc(50% - 0.25em);
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-75 {
width: calc(75% - 0.125em);
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-100 {
width: auto;
flex-basis: 100%;
}
} }
.wp-block-buttons.is-vertical > .wp-block-button.wp-block-button__width-50 {
width: 50%;
}
.wp-block-buttons.is-vertical > .wp-block-button.wp-block-button__width-75 {
width: 75%;
}
.wp-block-button.is-style-squared, .wp-block-button.is-style-squared,
.wp-block-button__link.wp-block-button.is-style-squared { .wp-block-button__link.wp-block-button.is-style-squared {
border-radius: 0; border-radius: 0;
@ -147,8 +141,8 @@
border-radius: 0 !important; border-radius: 0 !important;
} }
.is-style-outline > .wp-block-button__link, .is-style-outline > :where(.wp-block-button__link),
.wp-block-button__link.is-style-outline { :where(.wp-block-button__link).is-style-outline {
border: 2px solid currentColor; border: 2px solid currentColor;
padding: 0.667em 1.333em; padding: 0.667em 1.333em;
} }

View File

@ -1 +1 @@
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;cursor:pointer;display:inline-block;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-align:center;text-decoration:none;overflow-wrap:break-word;box-sizing:border-box}.wp-block-button__link:active,.wp-block-button__link:focus,.wp-block-button__link:hover,.wp-block-button__link:visited{color:#fff}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - .5em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - .5em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - .5em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{width:calc(100% - .5em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100:only-child{margin-left:0;width:100%}@supports (column-gap:0.5em){.wp-block-buttons.is-content-justification-right>.wp-block-button.wp-block-button,.wp-block-buttons>.wp-block-button.wp-block-button{margin-left:0;margin-right:0}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - .375em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - .25em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - .125em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{width:auto;flex-basis:100%}}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.is-style-outline>.wp-block-button__link,.wp-block-button__link.is-style-outline{border:2px solid;padding:.667em 1.333em}.is-style-outline>.wp-block-button__link:not(.has-text-color),.wp-block-button__link.is-style-outline:not(.has-text-color){color:currentColor}.is-style-outline>.wp-block-button__link:not(.has-background),.wp-block-button__link.is-style-outline:not(.has-background){background-color:initial} .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;cursor:pointer;display:inline-block;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-align:center;text-decoration:none;word-break:break-word;box-sizing:border-box}.wp-block-button__link:active,.wp-block-button__link:focus,.wp-block-button__link:hover,.wp-block-button__link:visited{color:#fff}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*0.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*0.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*0.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{width:100%;flex-basis:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.is-style-outline>:where(.wp-block-button__link),:where(.wp-block-button__link).is-style-outline{border:2px solid;padding:.667em 1.333em}.is-style-outline>.wp-block-button__link:not(.has-text-color),.wp-block-button__link.is-style-outline:not(.has-text-color){color:currentColor}.is-style-outline>.wp-block-button__link:not(.has-background),.wp-block-button__link.is-style-outline:not(.has-background){background-color:initial}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -79,7 +85,7 @@
padding: calc(0.667em + 2px) calc(1.333em + 2px); padding: calc(0.667em + 2px) calc(1.333em + 2px);
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
overflow-wrap: break-word; word-break: break-word;
box-sizing: border-box; box-sizing: border-box;
} }
.wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, .wp-block-button__link:visited { .wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, .wp-block-button__link:visited {
@ -103,41 +109,29 @@
font-size: inherit; font-size: inherit;
} }
.wp-block-buttons > .wp-block-button.wp-block-button__width-25 { .wp-block-buttons > .wp-block-button.wp-block-button__width-25 {
width: calc(25% - 0.5em); width: calc(25% - (var(--wp--style--block-gap, 0.5em) * 0.75));
} }
.wp-block-buttons > .wp-block-button.wp-block-button__width-50 { .wp-block-buttons > .wp-block-button.wp-block-button__width-50 {
width: calc(50% - 0.5em); width: calc(50% - (var(--wp--style--block-gap, 0.5em) * 0.5));
} }
.wp-block-buttons > .wp-block-button.wp-block-button__width-75 { .wp-block-buttons > .wp-block-button.wp-block-button__width-75 {
width: calc(75% - 0.5em); width: calc(75% - (var(--wp--style--block-gap, 0.5em) * 0.25));
} }
.wp-block-buttons > .wp-block-button.wp-block-button__width-100 { .wp-block-buttons > .wp-block-button.wp-block-button__width-100 {
width: calc(100% - 0.5em);
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-100:only-child {
margin-right: 0;
width: 100%; width: 100%;
flex-basis: 100%;
} }
@supports (column-gap: 0.5em) { .wp-block-buttons.is-vertical > .wp-block-button.wp-block-button__width-25 {
.wp-block-buttons > .wp-block-button.wp-block-button, .wp-block-buttons.is-content-justification-right > .wp-block-button.wp-block-button { width: 25%;
margin-right: 0;
margin-left: 0;
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-25 {
width: calc(25% - 0.375em);
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-50 {
width: calc(50% - 0.25em);
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-75 {
width: calc(75% - 0.125em);
}
.wp-block-buttons > .wp-block-button.wp-block-button__width-100 {
width: auto;
flex-basis: 100%;
}
} }
.wp-block-buttons.is-vertical > .wp-block-button.wp-block-button__width-50 {
width: 50%;
}
.wp-block-buttons.is-vertical > .wp-block-button.wp-block-button__width-75 {
width: 75%;
}
.wp-block-button.is-style-squared, .wp-block-button.is-style-squared,
.wp-block-button__link.wp-block-button.is-style-squared { .wp-block-button__link.wp-block-button.is-style-squared {
border-radius: 0; border-radius: 0;
@ -148,8 +142,8 @@
border-radius: 0 !important; border-radius: 0 !important;
} }
.is-style-outline > .wp-block-button__link, .is-style-outline > :where(.wp-block-button__link),
.wp-block-button__link.is-style-outline { :where(.wp-block-button__link).is-style-outline {
border: 2px solid currentColor; border: 2px solid currentColor;
padding: 0.667em 1.333em; padding: 0.667em 1.333em;
} }

View File

@ -1 +1 @@
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;cursor:pointer;display:inline-block;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-align:center;text-decoration:none;overflow-wrap:break-word;box-sizing:border-box}.wp-block-button__link:active,.wp-block-button__link:focus,.wp-block-button__link:hover,.wp-block-button__link:visited{color:#fff}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - .5em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - .5em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - .5em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{width:calc(100% - .5em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100:only-child{margin-right:0;width:100%}@supports (column-gap:0.5em){.wp-block-buttons.is-content-justification-right>.wp-block-button.wp-block-button,.wp-block-buttons>.wp-block-button.wp-block-button{margin-right:0;margin-left:0}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - .375em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - .25em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - .125em)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{width:auto;flex-basis:100%}}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.is-style-outline>.wp-block-button__link,.wp-block-button__link.is-style-outline{border:2px solid;padding:.667em 1.333em}.is-style-outline>.wp-block-button__link:not(.has-text-color),.wp-block-button__link.is-style-outline:not(.has-text-color){color:currentColor}.is-style-outline>.wp-block-button__link:not(.has-background),.wp-block-button__link.is-style-outline:not(.has-background){background-color:initial} .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;cursor:pointer;display:inline-block;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-align:center;text-decoration:none;word-break:break-word;box-sizing:border-box}.wp-block-button__link:active,.wp-block-button__link:focus,.wp-block-button__link:hover,.wp-block-button__link:visited{color:#fff}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*0.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*0.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*0.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{width:100%;flex-basis:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.is-style-outline>:where(.wp-block-button__link),:where(.wp-block-button__link).is-style-outline{border:2px solid;padding:.667em 1.333em}.is-style-outline>.wp-block-button__link:not(.has-text-color),.wp-block-button__link.is-style-outline:not(.has-text-color){color:currentColor}.is-style-outline>.wp-block-button__link:not(.has-background),.wp-block-button__link.is-style-outline:not(.has-background){background-color:initial}

View File

@ -6,18 +6,24 @@
"description": "Prompt visitors to take action with a group of button-style links.", "description": "Prompt visitors to take action with a group of button-style links.",
"keywords": [ "link" ], "keywords": [ "link" ],
"textdomain": "default", "textdomain": "default",
"attributes": {
"contentJustification": {
"type": "string"
},
"orientation": {
"type": "string",
"default": "horizontal"
}
},
"supports": { "supports": {
"anchor": true, "anchor": true,
"align": [ "wide", "full" ] "align": [ "wide", "full" ],
"__experimentalExposeControlsToChildren": true,
"spacing": {
"blockGap": true,
"margin": ["top", "bottom" ],
"__experimentalDefaultControls": {
"blockGap": true
}
},
"__experimentalLayout": {
"allowSwitching": false,
"allowInheriting": false,
"default": {
"type": "flex"
}
}
}, },
"editorStyle": "wp-block-buttons-editor", "editorStyle": "wp-block-buttons-editor",
"style": "wp-block-buttons" "style": "wp-block-buttons"

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,18 +74,14 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block > .wp-block-buttons {
display: flex;
flex-wrap: wrap;
}
.wp-block-buttons { .wp-block-buttons {
/* stylelint-disable indentation */ /* stylelint-disable indentation */
} }
.wp-block-buttons > .wp-block { .wp-block-buttons > .wp-block {
margin-right: 0; margin: 0;
margin-top: 0.5em; }
margin-left: 0.5em; .wp-block-buttons > .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button {
margin: 0;
} }
.wp-block-buttons > .block-list-appender { .wp-block-buttons > .block-list-appender {
display: inline-flex; display: inline-flex;

View File

@ -1 +1 @@
.wp-block>.wp-block-buttons{display:flex;flex-wrap:wrap}.wp-block-buttons>.wp-block{margin-right:0;margin-top:.5em;margin-left:.5em}.wp-block-buttons>.block-list-appender{display:inline-flex;align-items:center}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-right:auto;margin-left:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end} .wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{margin:0}.wp-block-buttons>.block-list-appender{display:inline-flex;align-items:center}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-right:auto;margin-left:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,18 +74,14 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block > .wp-block-buttons {
display: flex;
flex-wrap: wrap;
}
.wp-block-buttons { .wp-block-buttons {
/* stylelint-disable indentation */ /* stylelint-disable indentation */
} }
.wp-block-buttons > .wp-block { .wp-block-buttons > .wp-block {
margin-left: 0; margin: 0;
margin-top: 0.5em; }
margin-right: 0.5em; .wp-block-buttons > .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button {
margin: 0;
} }
.wp-block-buttons > .block-list-appender { .wp-block-buttons > .block-list-appender {
display: inline-flex; display: inline-flex;

View File

@ -1 +1 @@
.wp-block>.wp-block-buttons{display:flex;flex-wrap:wrap}.wp-block-buttons>.wp-block{margin-left:0;margin-top:.5em;margin-right:.5em}.wp-block-buttons>.block-list-appender{display:inline-flex;align-items:center}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-left:auto;margin-right:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end} .wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{margin:0}.wp-block-buttons>.block-list-appender{display:inline-flex;align-items:center}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-left:auto;margin-right:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -69,29 +75,17 @@
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-buttons { .wp-block-buttons {
display: flex;
flex-direction: row;
flex-wrap: wrap;
column-gap: 0.5em;
/* stylelint-disable indentation */ /* stylelint-disable indentation */
} }
.wp-block-buttons.is-vertical { .wp-block-buttons.is-vertical {
flex-direction: column; flex-direction: column;
} }
.wp-block-buttons.is-vertical > .wp-block-button {
margin-right: 0;
}
.wp-block-buttons.is-vertical > .wp-block-button:last-child { .wp-block-buttons.is-vertical > .wp-block-button:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.wp-block-buttons > .wp-block-button { .wp-block-buttons > .wp-block-button {
display: inline-block; display: inline-block;
margin-left: 0; margin: 0;
margin-right: 0.5em;
margin-bottom: 0.5em;
}
.wp-block-buttons > .wp-block-button:last-child {
margin-right: 0;
} }
.wp-block-buttons.is-content-justification-left { .wp-block-buttons.is-content-justification-left {
justify-content: flex-start; justify-content: flex-start;
@ -108,13 +102,6 @@
.wp-block-buttons.is-content-justification-right { .wp-block-buttons.is-content-justification-right {
justify-content: flex-end; justify-content: flex-end;
} }
.wp-block-buttons.is-content-justification-right > .wp-block-button {
margin-left: 0.5em;
margin-right: 0;
}
.wp-block-buttons.is-content-justification-right > .wp-block-button:first-child {
margin-left: 0;
}
.wp-block-buttons.is-content-justification-right.is-vertical { .wp-block-buttons.is-content-justification-right.is-vertical {
align-items: flex-end; align-items: flex-end;
} }
@ -124,20 +111,6 @@
.wp-block-buttons.aligncenter { .wp-block-buttons.aligncenter {
text-align: center; text-align: center;
} }
.wp-block-buttons.alignleft .wp-block-button {
margin-left: 0;
margin-right: 0.5em;
}
.wp-block-buttons.alignleft .wp-block-button:last-child {
margin-right: 0;
}
.wp-block-buttons.alignright .wp-block-button {
margin-right: 0;
margin-left: 0.5em;
}
.wp-block-buttons.alignright .wp-block-button:first-child {
margin-left: 0;
}
.wp-block-buttons:not(.is-content-justification-space-between, .wp-block-buttons:not(.is-content-justification-space-between,
.is-content-justification-right, .is-content-justification-right,
.is-content-justification-left, .is-content-justification-left,
@ -145,7 +118,6 @@
/* stylelint-enable indentation */ /* stylelint-enable indentation */
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
margin-bottom: 0.5em;
width: 100%; width: 100%;
} }

View File

@ -1 +1 @@
.wp-block-buttons{display:flex;flex-direction:row;flex-wrap:wrap;column-gap:.5em}.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button{margin-right:0}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin-left:0;margin-right:.5em;margin-bottom:.5em}.wp-block-buttons>.wp-block-button:last-child{margin-right:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right>.wp-block-button{margin-left:.5em;margin-right:0}.wp-block-buttons.is-content-justification-right>.wp-block-button:first-child{margin-left:0}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons.alignleft .wp-block-button{margin-left:0;margin-right:.5em}.wp-block-buttons.alignleft .wp-block-button:last-child{margin-right:0}.wp-block-buttons.alignright .wp-block-button{margin-right:0;margin-left:.5em}.wp-block-buttons.alignright .wp-block-button:first-child{margin-left:0}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-right:auto;margin-left:auto;margin-bottom:.5em;width:100%}.wp-block-button.aligncenter{text-align:center} .wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-right:auto;margin-left:auto;width:100%}.wp-block-button.aligncenter{text-align:center}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -69,33 +75,17 @@
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-buttons { .wp-block-buttons {
display: flex;
flex-direction: row;
flex-wrap: wrap;
column-gap: 0.5em;
/* stylelint-disable indentation */ /* stylelint-disable indentation */
} }
.wp-block-buttons.is-vertical { .wp-block-buttons.is-vertical {
flex-direction: column; flex-direction: column;
} }
.wp-block-buttons.is-vertical > .wp-block-button {
/*rtl:ignore*/
margin-right: 0;
}
.wp-block-buttons.is-vertical > .wp-block-button:last-child { .wp-block-buttons.is-vertical > .wp-block-button:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.wp-block-buttons > .wp-block-button { .wp-block-buttons > .wp-block-button {
display: inline-block; display: inline-block;
/*rtl:ignore*/ margin: 0;
margin-left: 0;
/*rtl:ignore*/
margin-right: 0.5em;
margin-bottom: 0.5em;
}
.wp-block-buttons > .wp-block-button:last-child {
/*rtl:ignore*/
margin-right: 0;
} }
.wp-block-buttons.is-content-justification-left { .wp-block-buttons.is-content-justification-left {
justify-content: flex-start; justify-content: flex-start;
@ -112,16 +102,6 @@
.wp-block-buttons.is-content-justification-right { .wp-block-buttons.is-content-justification-right {
justify-content: flex-end; justify-content: flex-end;
} }
.wp-block-buttons.is-content-justification-right > .wp-block-button {
/*rtl:ignore*/
margin-left: 0.5em;
/*rtl:ignore*/
margin-right: 0;
}
.wp-block-buttons.is-content-justification-right > .wp-block-button:first-child {
/*rtl:ignore*/
margin-left: 0;
}
.wp-block-buttons.is-content-justification-right.is-vertical { .wp-block-buttons.is-content-justification-right.is-vertical {
align-items: flex-end; align-items: flex-end;
} }
@ -131,26 +111,6 @@
.wp-block-buttons.aligncenter { .wp-block-buttons.aligncenter {
text-align: center; text-align: center;
} }
.wp-block-buttons.alignleft .wp-block-button {
/*rtl:ignore*/
margin-left: 0;
/*rtl:ignore*/
margin-right: 0.5em;
}
.wp-block-buttons.alignleft .wp-block-button:last-child {
/*rtl:ignore*/
margin-right: 0;
}
.wp-block-buttons.alignright .wp-block-button {
/*rtl:ignore*/
margin-right: 0;
/*rtl:ignore*/
margin-left: 0.5em;
}
.wp-block-buttons.alignright .wp-block-button:first-child {
/*rtl:ignore*/
margin-left: 0;
}
.wp-block-buttons:not(.is-content-justification-space-between, .wp-block-buttons:not(.is-content-justification-space-between,
.is-content-justification-right, .is-content-justification-right,
.is-content-justification-left, .is-content-justification-left,
@ -158,7 +118,6 @@
/* stylelint-enable indentation */ /* stylelint-enable indentation */
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
margin-bottom: 0.5em;
width: 100%; width: 100%;
} }

View File

@ -1 +1 @@
.wp-block-buttons{display:flex;flex-direction:row;flex-wrap:wrap;column-gap:.5em}.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button{margin-right:0}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin-left:0;margin-right:.5em;margin-bottom:.5em}.wp-block-buttons>.wp-block-button:last-child{margin-right:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right>.wp-block-button{margin-left:.5em;margin-right:0}.wp-block-buttons.is-content-justification-right>.wp-block-button:first-child{margin-left:0}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons.alignleft .wp-block-button{margin-left:0;margin-right:.5em}.wp-block-buttons.alignleft .wp-block-button:last-child{margin-right:0}.wp-block-buttons.alignright .wp-block-button{margin-right:0;margin-left:.5em}.wp-block-buttons.alignright .wp-block-button:first-child{margin-left:0}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;margin-bottom:.5em;width:100%}.wp-block-button.aligncenter{text-align:center} .wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-button.aligncenter{text-align:center}

View File

@ -15,6 +15,15 @@
function render_block_core_calendar( $attributes ) { function render_block_core_calendar( $attributes ) {
global $monthnum, $year; global $monthnum, $year;
// Calendar shouldn't be rendered
// when there are no published posts on the site.
if ( ! block_core_calendar_has_published_posts() ) {
if ( is_user_logged_in() ) {
return '<div>' . __( 'The calendar block is hidden because there are no published posts.', 'gutenberg' ) . '</div>';
}
return '';
}
$previous_monthnum = $monthnum; $previous_monthnum = $monthnum;
$previous_year = $year; $previous_year = $year;
@ -59,3 +68,86 @@ function register_block_core_calendar() {
} }
add_action( 'init', 'register_block_core_calendar' ); add_action( 'init', 'register_block_core_calendar' );
/**
* Returns whether or not there are any published posts.
*
* Used to hide the calendar block when there are no published posts.
* This compensates for a known Core bug: https://core.trac.wordpress.org/ticket/12016
*
* @return bool Has any published posts or not.
*/
function block_core_calendar_has_published_posts() {
// Multisite already has an option that stores the count of the published posts.
// Let's use that for multisites.
if ( is_multisite() ) {
return 0 < (int) get_option( 'post_count' );
}
// On single sites we try our own cached option first.
$has_published_posts = get_option( 'gutenberg_calendar_block_has_published_posts', null );
if ( null !== $has_published_posts ) {
return (bool) $has_published_posts;
}
// No cache hit, let's update the cache and return the cached value.
return block_core_calendar_update_has_published_posts();
}
/**
* Queries the database for any published post and saves
* a flag whether any published post exists or not.
*
* @return bool Has any published posts or not.
*/
function block_core_calendar_update_has_published_posts() {
global $wpdb;
$has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" );
update_option( 'gutenberg_calendar_block_has_published_posts', $has_published_posts );
return $has_published_posts;
}
// We only want to register these functions and actions when
// we are on single sites. On multi sites we use `post_count` option.
if ( ! is_multisite() ) {
/**
* Handler for updating the has published posts flag when a post is deleted.
*
* @param int $post_id Deleted post ID.
*/
function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
$post = get_post( $post_id );
if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {
return;
}
block_core_calendar_update_has_published_posts();
}
/**
* Handler for updating the has published posts flag when a post status changes.
*
* @param string $new_status The status the post is changing to.
* @param string $old_status The status the post is changing from.
* @param WP_Post $post Post object.
*/
function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) {
if ( $new_status === $old_status ) {
return;
}
if ( 'post' !== get_post_type( $post ) ) {
return;
}
if ( 'publish' !== $new_status && 'publish' !== $old_status ) {
return;
}
block_core_calendar_update_has_published_posts();
}
add_action( 'delete_post', 'block_core_calendar_update_has_published_post_on_delete' );
add_action( 'transition_post_status', 'block_core_calendar_update_has_published_post_on_transition_post_status', 10, 3 );
}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -23,6 +23,9 @@ function render_block_core_categories( $attributes ) {
'show_count' => ! empty( $attributes['showPostCounts'] ), 'show_count' => ! empty( $attributes['showPostCounts'] ),
'title_li' => '', 'title_li' => '',
); );
if ( ! empty( $attributes['showOnlyTopLevel'] ) && $attributes['showOnlyTopLevel'] ) {
$args['parent'] = 0;
}
if ( ! empty( $attributes['displayAsDropdown'] ) ) { if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$id = 'wp-block-categories-' . $block_id; $id = 'wp-block-categories-' . $block_id;

View File

@ -17,6 +17,10 @@
"showPostCounts": { "showPostCounts": {
"type": "boolean", "type": "boolean",
"default": false "default": false
},
"showOnlyTopLevel": {
"type": "boolean",
"default": false
} }
}, },
"supports": { "supports": {

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -14,8 +14,32 @@
}, },
"supports": { "supports": {
"anchor": true, "anchor": true,
"__experimentalSelector": ".wp-block-code > code",
"typography": { "typography": {
"fontSize": true "fontSize": true,
"lineHeight": true,
"__experimentalFontStyle": true,
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalTextTransform": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"spacing": {
"margin": [ "top", "bottom" ],
"padding": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
},
"color": {
"text": true,
"background": true,
"gradients": true
} }
}, },
"style": "wp-block-code" "style": "wp-block-code"

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,13 +74,10 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.block-library-heading-level-dropdown .components-popover__content { .wp-block-code {
min-width: 230px; font-family: Menlo, Consolas, monaco, monospace;
} color: #1e1e1e;
.block-library-heading-level-dropdown .components-popover__content > div { padding: 0.8em 1em;
padding: 0; border: 1px solid #ddd;
} border-radius: 4px;
.block-library-heading-level-toolbar {
border: none;
} }

View File

@ -0,0 +1 @@
.wp-block-code{font-family:Menlo,Consolas,monaco,monospace;color:#1e1e1e;padding:.8em 1em;border:1px solid #ddd;border-radius:4px}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,13 +74,10 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.block-library-heading-level-dropdown .components-popover__content { .wp-block-code {
min-width: 230px; font-family: Menlo, Consolas, monaco, monospace;
} color: #1e1e1e;
.block-library-heading-level-dropdown .components-popover__content > div { padding: 0.8em 1em;
padding: 0; border: 1px solid #ddd;
} border-radius: 4px;
.block-library-heading-level-toolbar {
border: none;
} }

1
wp-includes/blocks/code/theme.min.css vendored Normal file
View File

@ -0,0 +1 @@
.wp-block-code{font-family:Menlo,Consolas,monaco,monospace;color:#1e1e1e;padding:.8em 1em;border:1px solid #ddd;border-radius:4px}

View File

@ -13,7 +13,11 @@
"width": { "width": {
"type": "string" "type": "string"
}, },
"allowedBlocks": {
"type": "array"
},
"templateLock": { "templateLock": {
"type": "string",
"enum": [ "all", "insert", false ] "enum": [ "all", "insert", false ]
} }
}, },
@ -26,7 +30,10 @@
"link": true "link": true
}, },
"spacing": { "spacing": {
"padding": true "padding": true,
"__experimentalDefaultControls": {
"padding": true
}
} }
} }
} }

View File

@ -3,11 +3,15 @@
"name": "core/columns", "name": "core/columns",
"title": "Columns", "title": "Columns",
"category": "design", "category": "design",
"description": "Add a block that displays content in multiple columns, then add whatever content blocks youd like.", "description": "Display content in multiple columns, with blocks added to each column.",
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"verticalAlignment": { "verticalAlignment": {
"type": "string" "type": "string"
},
"isStackedOnMobile": {
"type": "boolean",
"default": true
} }
}, },
"supports": { "supports": {
@ -17,6 +21,14 @@
"color": { "color": {
"gradients": true, "gradients": true,
"link": true "link": true
},
"spacing": {
"blockGap": true,
"margin": [ "top", "bottom" ],
"padding": true,
"__experimentalDefaultControls": {
"blockGap": true
}
} }
}, },
"editorStyle": "wp-block-columns-editor", "editorStyle": "wp-block-columns-editor",

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,7 +74,7 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-columns .wp-block { .wp-block-columns :where(.wp-block) {
max-width: none; max-width: none;
margin-right: 0; margin-right: 0;
margin-left: 0; margin-left: 0;
@ -76,12 +82,12 @@
@media (min-width: 600px) { @media (min-width: 600px) {
.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(even) { .editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(even) {
margin-right: 32px; margin-right: var(--wp--style--block-gap, 2em);
} }
} }
@media (min-width: 782px) { @media (min-width: 782px) {
.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child) { .editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child) {
margin-right: 32px; margin-right: var(--wp--style--block-gap, 2em);
} }
} }
.block-editor-block-list__block.wp-block-column.wp-block-column { .block-editor-block-list__block.wp-block-column.wp-block-column {

View File

@ -1 +1 @@
.wp-block-columns .wp-block{max-width:none;margin-right:0;margin-left:0}@media (min-width:600px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(2n){margin-right:32px}}@media (min-width:782px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child){margin-right:32px}}.block-editor-block-list__block.wp-block-column.wp-block-column{margin-top:0;margin-bottom:0} .wp-block-columns :where(.wp-block){max-width:none;margin-right:0;margin-left:0}@media (min-width:600px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(2n){margin-right:var(--wp--style--block-gap,2em)}}@media (min-width:782px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child){margin-right:var(--wp--style--block-gap,2em)}}.block-editor-block-list__block.wp-block-column.wp-block-column{margin-top:0;margin-bottom:0}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,7 +74,7 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-columns .wp-block { .wp-block-columns :where(.wp-block) {
max-width: none; max-width: none;
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;
@ -76,12 +82,12 @@
@media (min-width: 600px) { @media (min-width: 600px) {
.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(even) { .editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(even) {
margin-left: 32px; margin-left: var(--wp--style--block-gap, 2em);
} }
} }
@media (min-width: 782px) { @media (min-width: 782px) {
.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child) { .editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child) {
margin-left: 32px; margin-left: var(--wp--style--block-gap, 2em);
} }
} }
.block-editor-block-list__block.wp-block-column.wp-block-column { .block-editor-block-list__block.wp-block-column.wp-block-column {

View File

@ -1 +1 @@
.wp-block-columns .wp-block{max-width:none;margin-left:0;margin-right:0}@media (min-width:600px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(2n){margin-left:32px}}@media (min-width:782px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child){margin-left:32px}}.block-editor-block-list__block.wp-block-column.wp-block-column{margin-top:0;margin-bottom:0} .wp-block-columns :where(.wp-block){max-width:none;margin-left:0;margin-right:0}@media (min-width:600px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(2n){margin-left:var(--wp--style--block-gap,2em)}}@media (min-width:782px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child){margin-left:var(--wp--style--block-gap,2em)}}.block-editor-block-list__block.wp-block-column.wp-block-column{margin-top:0;margin-bottom:0}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -82,7 +88,7 @@
flex-wrap: nowrap; flex-wrap: nowrap;
} }
} }
.wp-block-columns.has-background { .wp-block-columns:where(.has-background) {
padding: 1.25em 2.375em; padding: 1.25em 2.375em;
} }
.wp-block-columns.are-vertically-aligned-top { .wp-block-columns.are-vertically-aligned-top {
@ -94,6 +100,45 @@
.wp-block-columns.are-vertically-aligned-bottom { .wp-block-columns.are-vertically-aligned-bottom {
align-items: flex-end; align-items: flex-end;
} }
@media (max-width: 599px) {
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
flex-basis: 100% !important;
}
}
@media (min-width: 600px) and (max-width: 781px) {
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:only-child) {
flex-basis: calc(50% - calc(var(--wp--style--block-gap, 2em) / 2)) !important;
flex-grow: 0;
}
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:nth-child(even) {
margin-right: var(--wp--style--block-gap, 2em);
}
}
@media (min-width: 782px) {
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
flex-basis: 0;
flex-grow: 1;
}
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column[style*=flex-basis] {
flex-grow: 0;
}
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:first-child) {
margin-right: var(--wp--style--block-gap, 2em);
}
}
.wp-block-columns.is-not-stacked-on-mobile {
flex-wrap: nowrap;
}
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column {
flex-basis: 0;
flex-grow: 1;
}
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column[style*=flex-basis] {
flex-grow: 0;
}
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column:not(:first-child) {
margin-right: var(--wp--style--block-gap, 2em);
}
.wp-block-column { .wp-block-column {
flex-grow: 1; flex-grow: 1;
@ -104,32 +149,6 @@
* Individual Column Alignment * Individual Column Alignment
*/ */
} }
@media (max-width: 599px) {
.wp-block-column {
flex-basis: 100% !important;
}
}
@media (min-width: 600px) and (max-width: 781px) {
.wp-block-column:not(:only-child) {
flex-basis: calc(50% - 1em) !important;
flex-grow: 0;
}
.wp-block-column:nth-child(even) {
margin-right: 2em;
}
}
@media (min-width: 782px) {
.wp-block-column {
flex-basis: 0;
flex-grow: 1;
}
.wp-block-column[style*=flex-basis] {
flex-grow: 0;
}
.wp-block-column:not(:first-child) {
margin-right: 2em;
}
}
.wp-block-column.is-vertically-aligned-top { .wp-block-column.is-vertically-aligned-top {
align-self: flex-start; align-self: flex-start;
} }

View File

@ -1 +1 @@
.wp-block-columns{display:flex;margin-bottom:1.75em;box-sizing:border-box;flex-wrap:wrap}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap}}.wp-block-columns.has-background{padding:1.25em 2.375em}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}.wp-block-column{flex-grow:1;min-width:0;word-break:break-word;overflow-wrap:break-word}@media (max-width:599px){.wp-block-column{flex-basis:100%!important}}@media (min-width:600px) and (max-width:781px){.wp-block-column:not(:only-child){flex-basis:calc(50% - 1em)!important;flex-grow:0}.wp-block-column:nth-child(2n){margin-right:2em}}@media (min-width:782px){.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-column:not(:first-child){margin-right:2em}}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%} .wp-block-columns{display:flex;margin-bottom:1.75em;box-sizing:border-box;flex-wrap:wrap}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap}}.wp-block-columns:where(.has-background){padding:1.25em 2.375em}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:599px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:600px) and (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:only-child){flex-basis:calc(50% - var(--wp--style--block-gap, 2em)/2)!important;flex-grow:0}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:nth-child(2n){margin-right:var(--wp--style--block-gap,2em)}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:first-child){margin-right:var(--wp--style--block-gap,2em)}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column:not(:first-child){margin-right:var(--wp--style--block-gap,2em)}.wp-block-column{flex-grow:1;min-width:0;word-break:break-word;overflow-wrap:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -82,7 +88,7 @@
flex-wrap: nowrap; flex-wrap: nowrap;
} }
} }
.wp-block-columns.has-background { .wp-block-columns:where(.has-background) {
padding: 1.25em 2.375em; padding: 1.25em 2.375em;
} }
.wp-block-columns.are-vertically-aligned-top { .wp-block-columns.are-vertically-aligned-top {
@ -94,6 +100,45 @@
.wp-block-columns.are-vertically-aligned-bottom { .wp-block-columns.are-vertically-aligned-bottom {
align-items: flex-end; align-items: flex-end;
} }
@media (max-width: 599px) {
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
flex-basis: 100% !important;
}
}
@media (min-width: 600px) and (max-width: 781px) {
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:only-child) {
flex-basis: calc(50% - calc(var(--wp--style--block-gap, 2em) / 2)) !important;
flex-grow: 0;
}
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:nth-child(even) {
margin-left: var(--wp--style--block-gap, 2em);
}
}
@media (min-width: 782px) {
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
flex-basis: 0;
flex-grow: 1;
}
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column[style*=flex-basis] {
flex-grow: 0;
}
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:first-child) {
margin-left: var(--wp--style--block-gap, 2em);
}
}
.wp-block-columns.is-not-stacked-on-mobile {
flex-wrap: nowrap;
}
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column {
flex-basis: 0;
flex-grow: 1;
}
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column[style*=flex-basis] {
flex-grow: 0;
}
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column:not(:first-child) {
margin-left: var(--wp--style--block-gap, 2em);
}
.wp-block-column { .wp-block-column {
flex-grow: 1; flex-grow: 1;
@ -104,32 +149,6 @@
* Individual Column Alignment * Individual Column Alignment
*/ */
} }
@media (max-width: 599px) {
.wp-block-column {
flex-basis: 100% !important;
}
}
@media (min-width: 600px) and (max-width: 781px) {
.wp-block-column:not(:only-child) {
flex-basis: calc(50% - 1em) !important;
flex-grow: 0;
}
.wp-block-column:nth-child(even) {
margin-left: 2em;
}
}
@media (min-width: 782px) {
.wp-block-column {
flex-basis: 0;
flex-grow: 1;
}
.wp-block-column[style*=flex-basis] {
flex-grow: 0;
}
.wp-block-column:not(:first-child) {
margin-left: 2em;
}
}
.wp-block-column.is-vertically-aligned-top { .wp-block-column.is-vertically-aligned-top {
align-self: flex-start; align-self: flex-start;
} }

View File

@ -1 +1 @@
.wp-block-columns{display:flex;margin-bottom:1.75em;box-sizing:border-box;flex-wrap:wrap}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap}}.wp-block-columns.has-background{padding:1.25em 2.375em}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}.wp-block-column{flex-grow:1;min-width:0;word-break:break-word;overflow-wrap:break-word}@media (max-width:599px){.wp-block-column{flex-basis:100%!important}}@media (min-width:600px) and (max-width:781px){.wp-block-column:not(:only-child){flex-basis:calc(50% - 1em)!important;flex-grow:0}.wp-block-column:nth-child(2n){margin-left:2em}}@media (min-width:782px){.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-column:not(:first-child){margin-left:2em}}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%} .wp-block-columns{display:flex;margin-bottom:1.75em;box-sizing:border-box;flex-wrap:wrap}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap}}.wp-block-columns:where(.has-background){padding:1.25em 2.375em}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:599px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:600px) and (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:only-child){flex-basis:calc(50% - var(--wp--style--block-gap, 2em)/2)!important;flex-grow:0}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:nth-child(2n){margin-left:var(--wp--style--block-gap,2em)}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:first-child){margin-left:var(--wp--style--block-gap,2em)}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column:not(:first-child){margin-left:var(--wp--style--block-gap,2em)}.wp-block-column{flex-grow:1;min-width:0;word-break:break-word;overflow-wrap:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}

View File

@ -12,6 +12,13 @@
"id": { "id": {
"type": "number" "type": "number"
}, },
"alt": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "alt",
"default": ""
},
"hasParallax": { "hasParallax": {
"type": "boolean", "type": "boolean",
"default": false "default": false
@ -22,7 +29,7 @@
}, },
"dimRatio": { "dimRatio": {
"type": "number", "type": "number",
"default": 50 "default": 100
}, },
"overlayColor": { "overlayColor": {
"type": "string" "type": "string"
@ -51,6 +58,17 @@
}, },
"contentPosition": { "contentPosition": {
"type": "string" "type": "string"
},
"isDark": {
"type": "boolean",
"default": true
},
"allowedBlocks": {
"type": "array"
},
"templateLock": {
"type": "string",
"enum": [ "all", "insert", false ]
} }
}, },
"supports": { "supports": {
@ -58,7 +76,10 @@
"align": true, "align": true,
"html": false, "html": false,
"spacing": { "spacing": {
"padding": true "padding": true,
"__experimentalDefaultControls": {
"padding": true
}
}, },
"color": { "color": {
"__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background", "__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background",

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,10 +74,28 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-cover {
/* Extra specificity needed because the reset.css applied in the editor context is overriding this rule. */
}
.editor-styles-wrapper .wp-block-cover {
box-sizing: border-box;
}
.wp-block-cover.is-placeholder { .wp-block-cover.is-placeholder {
min-height: auto !important; min-height: auto !important;
padding: 0 !important; padding: 0 !important;
} }
.wp-block-cover.is-placeholder .block-library-cover__resize-container {
display: none;
}
.wp-block-cover.is-placeholder .components-placeholder.is-large {
min-height: 240px;
justify-content: flex-start;
z-index: 1;
}
.wp-block-cover.is-placeholder .components-placeholder.is-large + .block-library-cover__resize-container {
min-height: 240px;
display: block;
}
.wp-block-cover.components-placeholder h2 { .wp-block-cover.components-placeholder h2 {
color: inherit; color: inherit;
} }
@ -115,45 +139,15 @@
right: 0; right: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
min-height: 50px;
} }
.block-library-cover__resize-container:not(.is-resizing) { .block-library-cover__resize-container:not(.is-resizing) {
height: auto !important; height: auto !important;
} }
.wp-block-cover > .components-drop-zone.is-active {
transition: 0.2s opacity, 0.2s border;
}
@media (prefers-reduced-motion: reduce) {
.wp-block-cover > .components-drop-zone.is-active {
transition-duration: 0s;
transition-delay: 0s;
}
}
.wp-block-cover > .components-drop-zone.is-dragging-over-element {
background-color: transparent;
border: 48px solid var(--wp-admin-theme-color);
}
.wp-block-cover > .components-drop-zone.is-dragging-over-element .components-drop-zone__content {
transform: none;
}
.wp-block-cover > .components-drop-zone .components-drop-zone__content { .wp-block-cover > .components-drop-zone .components-drop-zone__content {
display: flex; opacity: 0.8 !important;
align-items: center;
top: -36px;
right: -36px;
transform: none;
}
.wp-block-cover > .components-drop-zone .components-drop-zone__content-icon,
.wp-block-cover > .components-drop-zone .components-drop-zone__content-text {
display: inline;
}
.wp-block-cover > .components-drop-zone .components-drop-zone__content-icon {
margin: 0;
margin-left: 8px;
}
.wp-block-cover > .components-drop-zone .components-drop-zone__content-text {
font-size: 13px;
} }
.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover { .block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover {

View File

@ -1 +1 @@
.wp-block-cover.is-placeholder{min-height:auto!important;padding:0!important}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{position:absolute;z-index:1;top:50%;right:50%;transform:translate(50%,-50%);margin:0}.wp-block-cover .block-editor-block-list__layout{width:100%}.wp-block-cover .wp-block-cover__inner-container{text-align:right;margin-right:0;margin-left:0}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-right:auto}.block-library-cover__resize-container{position:absolute!important;top:0;right:0;left:0;bottom:0}.block-library-cover__resize-container:not(.is-resizing){height:auto!important}.wp-block-cover>.components-drop-zone.is-active{transition:opacity .2s,border .2s}@media (prefers-reduced-motion:reduce){.wp-block-cover>.components-drop-zone.is-active{transition-duration:0s;transition-delay:0s}}.wp-block-cover>.components-drop-zone.is-dragging-over-element{background-color:initial;border:48px solid var(--wp-admin-theme-color)}.wp-block-cover>.components-drop-zone.is-dragging-over-element .components-drop-zone__content{transform:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{display:flex;align-items:center;top:-36px;right:-36px;transform:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content-icon,.wp-block-cover>.components-drop-zone .components-drop-zone__content-text{display:inline}.wp-block-cover>.components-drop-zone .components-drop-zone__content-icon{margin:0 0 0 8px}.wp-block-cover>.components-drop-zone .components-drop-zone__content-text{font-size:13px}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll} .editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{min-height:auto!important;padding:0!important}.wp-block-cover.is-placeholder .block-library-cover__resize-container{display:none}.wp-block-cover.is-placeholder .components-placeholder.is-large{min-height:240px;justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{min-height:240px;display:block}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{position:absolute;z-index:1;top:50%;right:50%;transform:translate(50%,-50%);margin:0}.wp-block-cover .block-editor-block-list__layout{width:100%}.wp-block-cover .wp-block-cover__inner-container{text-align:right;margin-right:0;margin-left:0}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-right:auto}.block-library-cover__resize-container{position:absolute!important;top:0;right:0;left:0;bottom:0;min-height:50px}.block-library-cover__resize-container:not(.is-resizing){height:auto!important}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,10 +74,28 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-cover {
/* Extra specificity needed because the reset.css applied in the editor context is overriding this rule. */
}
.editor-styles-wrapper .wp-block-cover {
box-sizing: border-box;
}
.wp-block-cover.is-placeholder { .wp-block-cover.is-placeholder {
min-height: auto !important; min-height: auto !important;
padding: 0 !important; padding: 0 !important;
} }
.wp-block-cover.is-placeholder .block-library-cover__resize-container {
display: none;
}
.wp-block-cover.is-placeholder .components-placeholder.is-large {
min-height: 240px;
justify-content: flex-start;
z-index: 1;
}
.wp-block-cover.is-placeholder .components-placeholder.is-large + .block-library-cover__resize-container {
min-height: 240px;
display: block;
}
.wp-block-cover.components-placeholder h2 { .wp-block-cover.components-placeholder h2 {
color: inherit; color: inherit;
} }
@ -115,45 +139,15 @@
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
min-height: 50px;
} }
.block-library-cover__resize-container:not(.is-resizing) { .block-library-cover__resize-container:not(.is-resizing) {
height: auto !important; height: auto !important;
} }
.wp-block-cover > .components-drop-zone.is-active {
transition: 0.2s opacity, 0.2s border;
}
@media (prefers-reduced-motion: reduce) {
.wp-block-cover > .components-drop-zone.is-active {
transition-duration: 0s;
transition-delay: 0s;
}
}
.wp-block-cover > .components-drop-zone.is-dragging-over-element {
background-color: transparent;
border: 48px solid var(--wp-admin-theme-color);
}
.wp-block-cover > .components-drop-zone.is-dragging-over-element .components-drop-zone__content {
transform: none;
}
.wp-block-cover > .components-drop-zone .components-drop-zone__content { .wp-block-cover > .components-drop-zone .components-drop-zone__content {
display: flex; opacity: 0.8 !important;
align-items: center;
top: -36px;
left: -36px;
transform: none;
}
.wp-block-cover > .components-drop-zone .components-drop-zone__content-icon,
.wp-block-cover > .components-drop-zone .components-drop-zone__content-text {
display: inline;
}
.wp-block-cover > .components-drop-zone .components-drop-zone__content-icon {
margin: 0;
margin-right: 8px;
}
.wp-block-cover > .components-drop-zone .components-drop-zone__content-text {
font-size: 13px;
} }
.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover { .block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover {

View File

@ -1 +1 @@
.wp-block-cover.is-placeholder{min-height:auto!important;padding:0!important}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}.wp-block-cover .block-editor-block-list__layout{width:100%}.wp-block-cover .wp-block-cover__inner-container{text-align:left;margin-left:0;margin-right:0}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-left:auto}.block-library-cover__resize-container{position:absolute!important;top:0;left:0;right:0;bottom:0}.block-library-cover__resize-container:not(.is-resizing){height:auto!important}.wp-block-cover>.components-drop-zone.is-active{transition:opacity .2s,border .2s}@media (prefers-reduced-motion:reduce){.wp-block-cover>.components-drop-zone.is-active{transition-duration:0s;transition-delay:0s}}.wp-block-cover>.components-drop-zone.is-dragging-over-element{background-color:initial;border:48px solid var(--wp-admin-theme-color)}.wp-block-cover>.components-drop-zone.is-dragging-over-element .components-drop-zone__content{transform:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{display:flex;align-items:center;top:-36px;left:-36px;transform:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content-icon,.wp-block-cover>.components-drop-zone .components-drop-zone__content-text{display:inline}.wp-block-cover>.components-drop-zone .components-drop-zone__content-icon{margin:0 8px 0 0}.wp-block-cover>.components-drop-zone .components-drop-zone__content-text{font-size:13px}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll} .editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{min-height:auto!important;padding:0!important}.wp-block-cover.is-placeholder .block-library-cover__resize-container{display:none}.wp-block-cover.is-placeholder .components-placeholder.is-large{min-height:240px;justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{min-height:240px;display:block}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}.wp-block-cover .block-editor-block-list__layout{width:100%}.wp-block-cover .wp-block-cover__inner-container{text-align:left;margin-left:0;margin-right:0}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-left:auto}.block-library-cover__resize-container{position:absolute!important;top:0;left:0;right:0;bottom:0;min-height:50px}.block-library-cover__resize-container:not(.is-resizing){height:auto!important}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -133,64 +139,48 @@
z-index: 1; z-index: 1;
opacity: 0.5; opacity: 0.5;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,
.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0 {
.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before, opacity: 0;
.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background { }
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10 {
opacity: 0.1; opacity: 0.1;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,
.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20 {
.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background {
opacity: 0.2; opacity: 0.2;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,
.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30 {
.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background {
opacity: 0.3; opacity: 0.3;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,
.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40 {
.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background {
opacity: 0.4; opacity: 0.4;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,
.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50 {
.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background {
opacity: 0.5; opacity: 0.5;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,
.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60 {
.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background {
opacity: 0.6; opacity: 0.6;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,
.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70 {
.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background {
opacity: 0.7; opacity: 0.7;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,
.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80 {
.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background {
opacity: 0.8; opacity: 0.8;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,
.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90 {
.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background {
opacity: 0.9; opacity: 0.9;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,
.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100 {
.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background {
opacity: 1; opacity: 1;
} }
.wp-block-cover-image.alignleft, .wp-block-cover-image.alignright, .wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
@ -224,6 +214,10 @@
z-index: 1; z-index: 1;
color: #fff; color: #fff;
} }
.wp-block-cover-image.is-light .wp-block-cover__inner-container,
.wp-block-cover.is-light .wp-block-cover__inner-container {
color: #000;
}
.wp-block-cover-image p:not(.has-text-color), .wp-block-cover-image p:not(.has-text-color),
.wp-block-cover-image h1:not(.has-text-color), .wp-block-cover-image h1:not(.has-text-color),
.wp-block-cover-image h2:not(.has-text-color), .wp-block-cover-image h2:not(.has-text-color),

File diff suppressed because one or more lines are too long

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -133,64 +139,48 @@
z-index: 1; z-index: 1;
opacity: 0.5; opacity: 0.5;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,
.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0 {
.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before, opacity: 0;
.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background { }
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10 {
opacity: 0.1; opacity: 0.1;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,
.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20 {
.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background {
opacity: 0.2; opacity: 0.2;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,
.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30 {
.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background {
opacity: 0.3; opacity: 0.3;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,
.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40 {
.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background {
opacity: 0.4; opacity: 0.4;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,
.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50 {
.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background {
opacity: 0.5; opacity: 0.5;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,
.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60 {
.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background {
opacity: 0.6; opacity: 0.6;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,
.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70 {
.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background {
opacity: 0.7; opacity: 0.7;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,
.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80 {
.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background {
opacity: 0.8; opacity: 0.8;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,
.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90 {
.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background {
opacity: 0.9; opacity: 0.9;
} }
.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before, .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,
.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background, .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100 {
.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background {
opacity: 1; opacity: 1;
} }
.wp-block-cover-image.alignleft, .wp-block-cover-image.alignright, .wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
@ -224,6 +214,10 @@
z-index: 1; z-index: 1;
color: #fff; color: #fff;
} }
.wp-block-cover-image.is-light .wp-block-cover__inner-container,
.wp-block-cover.is-light .wp-block-cover__inner-container {
color: #000;
}
.wp-block-cover-image p:not(.has-text-color), .wp-block-cover-image p:not(.has-text-color),
.wp-block-cover-image h1:not(.has-text-color), .wp-block-cover-image h1:not(.has-text-color),
.wp-block-cover-image h2:not(.has-text-color), .wp-block-cover-image h2:not(.has-text-color),

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
"name": "core/embed", "name": "core/embed",
"title": "Embed", "title": "Embed",
"category": "embed", "category": "embed",
"description": "Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube.", "description": "Add a block that displays content pulled from other sites, like Twitter or YouTube.",
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"url": { "url": {

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -89,6 +95,7 @@
.wp-block-embed { .wp-block-embed {
margin: 0 0 1em 0; margin: 0 0 1em 0;
overflow-wrap: break-word;
} }
.wp-block-embed figcaption { .wp-block-embed figcaption {
margin-top: 0.5em; margin-top: 0.5em;

View File

@ -1 +1 @@
.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-width:320px;min-height:240px}.wp-block-embed{margin:0 0 1em}.wp-block-embed figcaption{margin-top:.5em;margin-bottom:1em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{position:absolute;top:0;left:0;bottom:0;right:0;height:100%;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%} .wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-width:320px;min-height:240px}.wp-block-embed{margin:0 0 1em;overflow-wrap:break-word}.wp-block-embed figcaption{margin-top:.5em;margin-bottom:1em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{position:absolute;top:0;left:0;bottom:0;right:0;height:100%;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -89,6 +95,7 @@
.wp-block-embed { .wp-block-embed {
margin: 0 0 1em 0; margin: 0 0 1em 0;
overflow-wrap: break-word;
} }
.wp-block-embed figcaption { .wp-block-embed figcaption {
margin-top: 0.5em; margin-top: 0.5em;

View File

@ -1 +1 @@
.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-width:320px;min-height:240px}.wp-block-embed{margin:0 0 1em}.wp-block-embed figcaption{margin-top:.5em;margin-bottom:1em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{position:absolute;top:0;right:0;bottom:0;left:0;height:100%;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%} .wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-width:320px;min-height:240px}.wp-block-embed{margin:0 0 1em;overflow-wrap:break-word}.wp-block-embed figcaption{margin-top:.5em;margin-bottom:1em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{position:absolute;top:0;right:0;bottom:0;left:0;height:100%;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}

View File

@ -0,0 +1,84 @@
/**
* Colors
*/
/**
* Breakpoints & Media Queries
*/
/**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Dimensions.
*/
/**
* Shadows.
*/
/**
* Editor widths.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Breakpoint mixins
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-embed figcaption {
color: #555;
font-size: 13px;
text-align: center;
}
.is-dark-theme .wp-block-embed figcaption {
color: rgba(255, 255, 255, 0.65);
}

View File

@ -0,0 +1 @@
.wp-block-embed figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed figcaption{color:hsla(0,0%,100%,.65)}

View File

@ -0,0 +1,84 @@
/**
* Colors
*/
/**
* Breakpoints & Media Queries
*/
/**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Dimensions.
*/
/**
* Shadows.
*/
/**
* Editor widths.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Breakpoint mixins
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-embed figcaption {
color: #555;
font-size: 13px;
text-align: center;
}
.is-dark-theme .wp-block-embed figcaption {
color: rgba(255, 255, 255, 0.65);
}

View File

@ -0,0 +1 @@
.wp-block-embed figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed figcaption{color:hsla(0,0%,100%,.65)}

View File

@ -13,6 +13,12 @@
"href": { "href": {
"type": "string" "type": "string"
}, },
"fileId": {
"type": "string",
"source": "attribute",
"selector": "a:not([download])",
"attribute": "id"
},
"fileName": { "fileName": {
"type": "string", "type": "string",
"source": "html", "source": "html",

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */

View File

@ -58,6 +58,13 @@
}, },
"default": [] "default": []
}, },
"shortCodeTransforms": {
"type": "array",
"default": [],
"items": {
"type": "object"
}
},
"columns": { "columns": {
"type": "number", "type": "number",
"minimum": 1, "minimum": 1,
@ -72,14 +79,30 @@
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },
"fixedHeight": {
"type": "boolean",
"default": true
},
"linkTarget": {
"type": "string"
},
"linkTo": { "linkTo": {
"type": "string" "type": "string"
}, },
"sizeSlug": { "sizeSlug": {
"type": "string", "type": "string",
"default": "large" "default": "large"
},
"allowResize": {
"type": "boolean",
"default": false
} }
}, },
"providesContext": {
"allowResize": "allowResize",
"imageCrop": "imageCrop",
"fixedHeight": "fixedHeight"
},
"supports": { "supports": {
"anchor": true, "anchor": true,
"align": true "align": true

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,27 +74,91 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-gallery li {
list-style-type: none;
}
.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label {
display: none;
}
.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button {
margin-bottom: 0;
}
figure.wp-block-gallery { figure.wp-block-gallery {
display: block; display: block;
margin: 0; margin: 0;
} }
figure.wp-block-gallery.has-nested-images .components-drop-zone {
.blocks-gallery-grid.blocks-gallery-grid { display: none;
padding-right: 0; pointer-events: none;
margin-right: 0; }
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;
top: 0;
left: 5px;
}
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; margin-bottom: 0;
} }
figure.wp-block-gallery .block-editor-media-placeholder {
margin: 0;
}
figure.wp-block-gallery .block-editor-media-placeholder::before {
box-shadow: 0 0 0 1px #fff inset, 0 0 0 3px var(--wp-admin-theme-color) inset;
content: "";
outline: 2px solid transparent;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 1;
pointer-events: none;
}
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 {
position: absolute;
top: 50%;
right: 50%;
margin-top: -9px;
margin-right: -9px;
}
/**
* Gallery inspector controls settings.
*/
.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 {
display: flex;
align-items: center;
color: #757575;
font-size: 12px;
}
.gallery-image-sizes .components-spinner {
margin: 0 4px 0 8px;
}
/**
* Deprecated css past this point. This can be removed once all galleries are migrated
* to V2.
*/
.blocks-gallery-item figure:not(.is-selected):focus, .blocks-gallery-item figure:not(.is-selected):focus,
.blocks-gallery-item img:focus { .blocks-gallery-item img:focus {
outline: none; outline: none;
@ -103,10 +173,6 @@ figure.wp-block-gallery {
bottom: 0; bottom: 0;
right: 0; right: 0;
z-index: 1; z-index: 1;
pointer-events: none;
}
.blocks-gallery-item figure.is-selected figcaption {
z-index: 2;
} }
.blocks-gallery-item figure.is-transient img { .blocks-gallery-item figure.is-transient img {
opacity: 0.3; opacity: 0.3;
@ -165,10 +231,18 @@ figure.wp-block-gallery {
left: -2px; left: -2px;
} }
.blocks-gallery-item .components-spinner { .wp-block-gallery ul.blocks-gallery-grid {
position: absolute; padding: 0;
top: 50%; margin: 0;
right: 50%; }
margin-top: -9px;
margin-right: -9px; .wp-block-update-gallery-modal {
max-width: 400px;
}
.wp-block-update-gallery-modal .wp-block-update-gallery-modal-buttons {
display: flex;
justify-content: flex-end;
}
.wp-block-update-gallery-modal .wp-block-update-gallery-modal-buttons .components-button {
margin-right: 12px;
} }

View File

@ -1 +1 @@
.wp-block-gallery li{list-style-type:none}.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery{display:block;margin:0}.blocks-gallery-grid.blocks-gallery-grid{padding-right:0;margin-right:0;margin-bottom:0}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";outline:2px solid transparent;position:absolute;top:0;left:0;bottom:0;right:0;z-index:1;pointer-events:none}.blocks-gallery-item figure.is-selected figcaption{z-index:2}.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{margin:0;height:100%}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{display:none;position:absolute;top:-2px;margin:8px;z-index:20;transition:box-shadow .2s ease-out;border-radius:2px;background:#fff;border:1px solid #1e1e1e}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-duration:0s;transition-delay:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 2px 6px rgba(0,0,0,.05)}@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{padding:0;width:inherit;height:inherit}}.block-library-gallery-item__inline-menu.is-left{right:-2px}.block-library-gallery-item__inline-menu.is-right{left:-2px}.blocks-gallery-item .components-spinner{position:absolute;top:50%;right:50%;margin-top:-9px;margin-right:-9px} figure.wp-block-gallery{display:block;margin:0}figure.wp-block-gallery.has-nested-images .components-drop-zone{display:none;pointer-events:none}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;top:0;left:5px}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:before{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";outline:2px solid transparent;position:absolute;top:0;left:0;bottom:0;right:0;z-index:1;pointer-events:none}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{position:absolute;top:50%;right:50%;margin-top:-9px;margin-right:-9px}.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{display:flex;align-items:center;color:#757575;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{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";outline:2px solid transparent;position:absolute;top:0;left:0;bottom:0;right: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{margin:0;height:100%}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{display:none;position:absolute;top:-2px;margin:8px;z-index:20;transition:box-shadow .2s ease-out;border-radius:2px;background:#fff;border:1px solid #1e1e1e}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-duration:0s;transition-delay:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 2px 6px rgba(0,0,0,.05)}@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{padding:0;width:inherit;height: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{padding:0;margin:0}.wp-block-update-gallery-modal{max-width:400px}.wp-block-update-gallery-modal .wp-block-update-gallery-modal-buttons{display:flex;justify-content:flex-end}.wp-block-update-gallery-modal .wp-block-update-gallery-modal-buttons .components-button{margin-right:12px}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -68,27 +74,91 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-gallery li {
list-style-type: none;
}
.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label {
display: none;
}
.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button {
margin-bottom: 0;
}
figure.wp-block-gallery { figure.wp-block-gallery {
display: block; display: block;
margin: 0; margin: 0;
} }
figure.wp-block-gallery.has-nested-images .components-drop-zone {
.blocks-gallery-grid.blocks-gallery-grid { display: none;
padding-left: 0; pointer-events: none;
margin-left: 0; }
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;
top: 0;
right: 5px;
}
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; margin-bottom: 0;
} }
figure.wp-block-gallery .block-editor-media-placeholder {
margin: 0;
}
figure.wp-block-gallery .block-editor-media-placeholder::before {
box-shadow: 0 0 0 1px #fff inset, 0 0 0 3px var(--wp-admin-theme-color) inset;
content: "";
outline: 2px solid transparent;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
pointer-events: none;
}
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 {
position: absolute;
top: 50%;
left: 50%;
margin-top: -9px;
margin-left: -9px;
}
/**
* Gallery inspector controls settings.
*/
.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 {
display: flex;
align-items: center;
color: #757575;
font-size: 12px;
}
.gallery-image-sizes .components-spinner {
margin: 0 8px 0 4px;
}
/**
* Deprecated css past this point. This can be removed once all galleries are migrated
* to V2.
*/
.blocks-gallery-item figure:not(.is-selected):focus, .blocks-gallery-item figure:not(.is-selected):focus,
.blocks-gallery-item img:focus { .blocks-gallery-item img:focus {
outline: none; outline: none;
@ -103,10 +173,6 @@ figure.wp-block-gallery {
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 1; z-index: 1;
pointer-events: none;
}
.blocks-gallery-item figure.is-selected figcaption {
z-index: 2;
} }
.blocks-gallery-item figure.is-transient img { .blocks-gallery-item figure.is-transient img {
opacity: 0.3; opacity: 0.3;
@ -165,10 +231,18 @@ figure.wp-block-gallery {
right: -2px; right: -2px;
} }
.blocks-gallery-item .components-spinner { .wp-block-gallery ul.blocks-gallery-grid {
position: absolute; padding: 0;
top: 50%; margin: 0;
left: 50%; }
margin-top: -9px;
margin-left: -9px; .wp-block-update-gallery-modal {
max-width: 400px;
}
.wp-block-update-gallery-modal .wp-block-update-gallery-modal-buttons {
display: flex;
justify-content: flex-end;
}
.wp-block-update-gallery-modal .wp-block-update-gallery-modal-buttons .components-button {
margin-left: 12px;
} }

View File

@ -1 +1 @@
.wp-block-gallery li{list-style-type:none}.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery{display:block;margin:0}.blocks-gallery-grid.blocks-gallery-grid{padding-left:0;margin-left:0;margin-bottom:0}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";outline:2px solid transparent;position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none}.blocks-gallery-item figure.is-selected figcaption{z-index:2}.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{margin:0;height:100%}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{display:none;position:absolute;top:-2px;margin:8px;z-index:20;transition:box-shadow .2s ease-out;border-radius:2px;background:#fff;border:1px solid #1e1e1e}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-duration:0s;transition-delay:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 2px 6px rgba(0,0,0,.05)}@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{padding:0;width:inherit;height:inherit}}.block-library-gallery-item__inline-menu.is-left{left:-2px}.block-library-gallery-item__inline-menu.is-right{right:-2px}.blocks-gallery-item .components-spinner{position:absolute;top:50%;left:50%;margin-top:-9px;margin-left:-9px} figure.wp-block-gallery{display:block;margin:0}figure.wp-block-gallery.has-nested-images .components-drop-zone{display:none;pointer-events:none}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;top:0;right:5px}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:before{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";outline:2px solid transparent;position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none}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{position:absolute;top:50%;left:50%;margin-top:-9px;margin-left:-9px}.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{display:flex;align-items:center;color:#757575;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{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";outline:2px solid transparent;position:absolute;top:0;right:0;bottom:0;left: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{margin:0;height:100%}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{display:none;position:absolute;top:-2px;margin:8px;z-index:20;transition:box-shadow .2s ease-out;border-radius:2px;background:#fff;border:1px solid #1e1e1e}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-duration:0s;transition-delay:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 2px 6px rgba(0,0,0,.05)}@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{padding:0;width:inherit;height: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{padding:0;margin:0}.wp-block-update-gallery-modal{max-width:400px}.wp-block-update-gallery-modal .wp-block-update-gallery-modal-buttons{display:flex;justify-content:flex-end}.wp-block-update-gallery-modal .wp-block-update-gallery-modal-buttons .components-button{margin-left:12px}

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -86,7 +92,6 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
position: relative; position: relative;
align-self: flex-start;
width: calc(50% - 1em); width: calc(50% - 1em);
} }
.wp-block-gallery .blocks-gallery-image:nth-of-type(even), .wp-block-gallery .blocks-gallery-image:nth-of-type(even),
@ -101,16 +106,9 @@
.blocks-gallery-grid .blocks-gallery-item figure { .blocks-gallery-grid .blocks-gallery-item figure {
margin: 0; margin: 0;
height: 100%; height: 100%;
} display: flex;
@supports (position: sticky) { align-items: flex-end;
.wp-block-gallery .blocks-gallery-image figure, justify-content: flex-start;
.wp-block-gallery .blocks-gallery-item figure,
.blocks-gallery-grid .blocks-gallery-image figure,
.blocks-gallery-grid .blocks-gallery-item figure {
display: flex;
align-items: flex-end;
justify-content: flex-start;
}
} }
.wp-block-gallery .blocks-gallery-image img, .wp-block-gallery .blocks-gallery-image img,
.wp-block-gallery .blocks-gallery-item img, .wp-block-gallery .blocks-gallery-item img,
@ -119,15 +117,7 @@
display: block; display: block;
max-width: 100%; max-width: 100%;
height: auto; height: auto;
width: 100%; width: auto;
}
@supports (position: sticky) {
.wp-block-gallery .blocks-gallery-image img,
.wp-block-gallery .blocks-gallery-item img,
.blocks-gallery-grid .blocks-gallery-image img,
.blocks-gallery-grid .blocks-gallery-item img {
width: auto;
}
} }
.wp-block-gallery .blocks-gallery-image figcaption, .wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption, .wp-block-gallery .blocks-gallery-item figcaption,
@ -145,6 +135,7 @@
background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0, rgba(0, 0, 0, 0.3) 70%, transparent); background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0, rgba(0, 0, 0, 0.3) 70%, transparent);
box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
z-index: 2;
} }
.wp-block-gallery .blocks-gallery-image figcaption img, .wp-block-gallery .blocks-gallery-image figcaption img,
.wp-block-gallery .blocks-gallery-item figcaption img, .wp-block-gallery .blocks-gallery-item figcaption img,
@ -156,11 +147,6 @@
.blocks-gallery-grid figcaption { .blocks-gallery-grid figcaption {
flex-grow: 1; flex-grow: 1;
} }
.wp-block-gallery.is-cropped .blocks-gallery-image, .wp-block-gallery.is-cropped .blocks-gallery-item,
.blocks-gallery-grid.is-cropped .blocks-gallery-image,
.blocks-gallery-grid.is-cropped .blocks-gallery-item {
align-self: inherit;
}
.wp-block-gallery.is-cropped .blocks-gallery-image a, .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-image img, .wp-block-gallery.is-cropped .blocks-gallery-item a,
.wp-block-gallery.is-cropped .blocks-gallery-item img, .wp-block-gallery.is-cropped .blocks-gallery-item img,
@ -169,20 +155,10 @@
.blocks-gallery-grid.is-cropped .blocks-gallery-item a, .blocks-gallery-grid.is-cropped .blocks-gallery-item a,
.blocks-gallery-grid.is-cropped .blocks-gallery-item img { .blocks-gallery-grid.is-cropped .blocks-gallery-item img {
width: 100%; width: 100%;
} height: 100%;
@supports (position: sticky) { flex: 1;
.wp-block-gallery.is-cropped .blocks-gallery-image a, -o-object-fit: cover;
.wp-block-gallery.is-cropped .blocks-gallery-image img, .wp-block-gallery.is-cropped .blocks-gallery-item a, object-fit: cover;
.wp-block-gallery.is-cropped .blocks-gallery-item img,
.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 {
height: 100%;
flex: 1;
-o-object-fit: cover;
object-fit: cover;
}
} }
.wp-block-gallery.columns-1 .blocks-gallery-image, .wp-block-gallery.columns-1 .blocks-gallery-item, .wp-block-gallery.columns-1 .blocks-gallery-image, .wp-block-gallery.columns-1 .blocks-gallery-item,
.blocks-gallery-grid.columns-1 .blocks-gallery-image, .blocks-gallery-grid.columns-1 .blocks-gallery-image,
@ -283,4 +259,197 @@
.wp-block-gallery.aligncenter .blocks-gallery-item figure, .wp-block-gallery.aligncenter .blocks-gallery-item figure,
.blocks-gallery-grid.aligncenter .blocks-gallery-item figure { .blocks-gallery-grid.aligncenter .blocks-gallery-item figure {
justify-content: center; justify-content: center;
}
.wp-block-gallery:not(.is-cropped) .blocks-gallery-item {
align-self: flex-start;
}
.wp-block-gallery.has-nested-images {
display: flex;
flex-wrap: wrap;
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
margin: 0 0 var(--gallery-block--gutter-size, 16px) var(--gallery-block--gutter-size, 16px);
width: calc(50% - (var(--gallery-block--gutter-size, 16px) / 2));
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):last-of-type:not(#individual-image) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):nth-of-type(even) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images figure.wp-block-image {
display: flex;
flex-grow: 1;
justify-content: center;
position: relative;
margin-top: auto;
margin-bottom: auto;
flex-direction: column;
}
.wp-block-gallery.has-nested-images figure.wp-block-image > div,
.wp-block-gallery.has-nested-images figure.wp-block-image > a {
margin: 0;
flex-direction: column;
flex-grow: 1;
}
.wp-block-gallery.has-nested-images figure.wp-block-image img {
display: block;
height: auto;
max-width: 100%;
width: auto;
}
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0, rgba(0, 0, 0, 0.3) 70%, transparent);
bottom: 0;
color: #fff;
font-size: 13px;
right: 0;
margin-bottom: 0;
max-height: 60%;
overflow: auto;
padding: 0 8px 8px;
position: absolute;
text-align: center;
width: 100%;
box-sizing: border-box;
}
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img {
display: inline;
}
.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded > div,
.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded > a {
flex: 1 1 auto;
}
.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption {
flex: initial;
background: none;
color: inherit;
margin: 0;
padding: 10px 10px 9px;
position: relative;
}
.wp-block-gallery.has-nested-images figcaption {
flex-grow: 1;
flex-basis: 100%;
text-align: center;
}
.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image) {
margin-top: 0;
margin-bottom: auto;
}
.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image) img {
margin-bottom: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image) figcaption {
bottom: var(--gallery-block--gutter-size, 16px);
}
.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) > div:not(.components-drop-zone),
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) > a {
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 {
width: 100%;
flex: 1 0 0%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}
.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image) {
margin-left: 0;
width: 100%;
}
@media (min-width: 600px) {
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
width: calc(33.3333333333% - (var(--gallery-block--gutter-size, 16px) * 0.6666666667));
}
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
width: calc(25% - (var(--gallery-block--gutter-size, 16px) * 0.75));
}
.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
width: calc(20% - (var(--gallery-block--gutter-size, 16px) * 0.8));
}
.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
width: calc(16.6666666667% - (var(--gallery-block--gutter-size, 16px) * 0.8333333333));
}
.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
width: calc(14.2857142857% - (var(--gallery-block--gutter-size, 16px) * 0.8571428571));
}
.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
width: calc(12.5% - (var(--gallery-block--gutter-size, 16px) * 0.875));
}
.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image):nth-of-type(1n) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images.columns-2 figure.wp-block-image:not(#individual-image):nth-of-type(2n) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image):nth-of-type(3n) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image):nth-of-type(4n) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image):nth-of-type(5n) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image):nth-of-type(6n) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image):nth-of-type(7n) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image):nth-of-type(8n) {
margin-left: 0;
}
.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image) {
margin-left: var(--gallery-block--gutter-size, 16px);
width: calc(33.33% - (var(--gallery-block--gutter-size, 16px) * 0.6666666667));
}
.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):nth-of-type(3n+3) {
margin-left: 0;
}
.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(--gallery-block--gutter-size, 16px) * 0.5));
}
.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(1) {
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;
} }

File diff suppressed because one or more lines are too long

View File

@ -40,6 +40,12 @@
* React Native specific. * React Native specific.
* These variables do not appear to be used anywhere else. * These variables do not appear to be used anywhere else.
*/ */
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/** /**
* Breakpoint mixins * Breakpoint mixins
*/ */
@ -86,7 +92,6 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
position: relative; position: relative;
align-self: flex-start;
width: calc(50% - 1em); width: calc(50% - 1em);
} }
.wp-block-gallery .blocks-gallery-image:nth-of-type(even), .wp-block-gallery .blocks-gallery-image:nth-of-type(even),
@ -101,16 +106,9 @@
.blocks-gallery-grid .blocks-gallery-item figure { .blocks-gallery-grid .blocks-gallery-item figure {
margin: 0; margin: 0;
height: 100%; height: 100%;
} display: flex;
@supports (position: sticky) { align-items: flex-end;
.wp-block-gallery .blocks-gallery-image figure, justify-content: flex-start;
.wp-block-gallery .blocks-gallery-item figure,
.blocks-gallery-grid .blocks-gallery-image figure,
.blocks-gallery-grid .blocks-gallery-item figure {
display: flex;
align-items: flex-end;
justify-content: flex-start;
}
} }
.wp-block-gallery .blocks-gallery-image img, .wp-block-gallery .blocks-gallery-image img,
.wp-block-gallery .blocks-gallery-item img, .wp-block-gallery .blocks-gallery-item img,
@ -119,15 +117,7 @@
display: block; display: block;
max-width: 100%; max-width: 100%;
height: auto; height: auto;
width: 100%; width: auto;
}
@supports (position: sticky) {
.wp-block-gallery .blocks-gallery-image img,
.wp-block-gallery .blocks-gallery-item img,
.blocks-gallery-grid .blocks-gallery-image img,
.blocks-gallery-grid .blocks-gallery-item img {
width: auto;
}
} }
.wp-block-gallery .blocks-gallery-image figcaption, .wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption, .wp-block-gallery .blocks-gallery-item figcaption,
@ -145,6 +135,7 @@
background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0, rgba(0, 0, 0, 0.3) 70%, transparent); background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0, rgba(0, 0, 0, 0.3) 70%, transparent);
box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
z-index: 2;
} }
.wp-block-gallery .blocks-gallery-image figcaption img, .wp-block-gallery .blocks-gallery-image figcaption img,
.wp-block-gallery .blocks-gallery-item figcaption img, .wp-block-gallery .blocks-gallery-item figcaption img,
@ -156,11 +147,6 @@
.blocks-gallery-grid figcaption { .blocks-gallery-grid figcaption {
flex-grow: 1; flex-grow: 1;
} }
.wp-block-gallery.is-cropped .blocks-gallery-image, .wp-block-gallery.is-cropped .blocks-gallery-item,
.blocks-gallery-grid.is-cropped .blocks-gallery-image,
.blocks-gallery-grid.is-cropped .blocks-gallery-item {
align-self: inherit;
}
.wp-block-gallery.is-cropped .blocks-gallery-image a, .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-image img, .wp-block-gallery.is-cropped .blocks-gallery-item a,
.wp-block-gallery.is-cropped .blocks-gallery-item img, .wp-block-gallery.is-cropped .blocks-gallery-item img,
@ -169,20 +155,10 @@
.blocks-gallery-grid.is-cropped .blocks-gallery-item a, .blocks-gallery-grid.is-cropped .blocks-gallery-item a,
.blocks-gallery-grid.is-cropped .blocks-gallery-item img { .blocks-gallery-grid.is-cropped .blocks-gallery-item img {
width: 100%; width: 100%;
} height: 100%;
@supports (position: sticky) { flex: 1;
.wp-block-gallery.is-cropped .blocks-gallery-image a, -o-object-fit: cover;
.wp-block-gallery.is-cropped .blocks-gallery-image img, .wp-block-gallery.is-cropped .blocks-gallery-item a, object-fit: cover;
.wp-block-gallery.is-cropped .blocks-gallery-item img,
.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 {
height: 100%;
flex: 1;
-o-object-fit: cover;
object-fit: cover;
}
} }
.wp-block-gallery.columns-1 .blocks-gallery-image, .wp-block-gallery.columns-1 .blocks-gallery-item, .wp-block-gallery.columns-1 .blocks-gallery-image, .wp-block-gallery.columns-1 .blocks-gallery-item,
.blocks-gallery-grid.columns-1 .blocks-gallery-image, .blocks-gallery-grid.columns-1 .blocks-gallery-image,
@ -283,4 +259,197 @@
.wp-block-gallery.aligncenter .blocks-gallery-item figure, .wp-block-gallery.aligncenter .blocks-gallery-item figure,
.blocks-gallery-grid.aligncenter .blocks-gallery-item figure { .blocks-gallery-grid.aligncenter .blocks-gallery-item figure {
justify-content: center; justify-content: center;
}
.wp-block-gallery:not(.is-cropped) .blocks-gallery-item {
align-self: flex-start;
}
.wp-block-gallery.has-nested-images {
display: flex;
flex-wrap: wrap;
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
margin: 0 var(--gallery-block--gutter-size, 16px) var(--gallery-block--gutter-size, 16px) 0;
width: calc(50% - (var(--gallery-block--gutter-size, 16px) / 2));
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):last-of-type:not(#individual-image) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):nth-of-type(even) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images figure.wp-block-image {
display: flex;
flex-grow: 1;
justify-content: center;
position: relative;
margin-top: auto;
margin-bottom: auto;
flex-direction: column;
}
.wp-block-gallery.has-nested-images figure.wp-block-image > div,
.wp-block-gallery.has-nested-images figure.wp-block-image > a {
margin: 0;
flex-direction: column;
flex-grow: 1;
}
.wp-block-gallery.has-nested-images figure.wp-block-image img {
display: block;
height: auto;
max-width: 100%;
width: auto;
}
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0, rgba(0, 0, 0, 0.3) 70%, transparent);
bottom: 0;
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%;
box-sizing: border-box;
}
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img {
display: inline;
}
.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded > div,
.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded > a {
flex: 1 1 auto;
}
.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption {
flex: initial;
background: none;
color: inherit;
margin: 0;
padding: 10px 10px 9px;
position: relative;
}
.wp-block-gallery.has-nested-images figcaption {
flex-grow: 1;
flex-basis: 100%;
text-align: center;
}
.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image) {
margin-top: 0;
margin-bottom: auto;
}
.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image) img {
margin-bottom: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image) figcaption {
bottom: var(--gallery-block--gutter-size, 16px);
}
.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) > div:not(.components-drop-zone),
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) > a {
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 {
width: 100%;
flex: 1 0 0%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}
.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image) {
margin-right: 0;
width: 100%;
}
@media (min-width: 600px) {
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
width: calc(33.3333333333% - (var(--gallery-block--gutter-size, 16px) * 0.6666666667));
}
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
width: calc(25% - (var(--gallery-block--gutter-size, 16px) * 0.75));
}
.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
width: calc(20% - (var(--gallery-block--gutter-size, 16px) * 0.8));
}
.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
width: calc(16.6666666667% - (var(--gallery-block--gutter-size, 16px) * 0.8333333333));
}
.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
width: calc(14.2857142857% - (var(--gallery-block--gutter-size, 16px) * 0.8571428571));
}
.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
width: calc(12.5% - (var(--gallery-block--gutter-size, 16px) * 0.875));
}
.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image).is-dragging ~ figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
}
.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image):nth-of-type(1n) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images.columns-2 figure.wp-block-image:not(#individual-image):nth-of-type(2n) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image):nth-of-type(3n) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image):nth-of-type(4n) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image):nth-of-type(5n) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image):nth-of-type(6n) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image):nth-of-type(7n) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image):nth-of-type(8n) {
margin-right: 0;
}
.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image) {
margin-right: var(--gallery-block--gutter-size, 16px);
width: calc(33.33% - (var(--gallery-block--gutter-size, 16px) * 0.6666666667));
}
.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):nth-of-type(3n+3) {
margin-right: 0;
}
.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(--gallery-block--gutter-size, 16px) * 0.5));
}
.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(1) {
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;
} }

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,84 @@
/**
* Colors
*/
/**
* Breakpoints & Media Queries
*/
/**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Dimensions.
*/
/**
* Shadows.
*/
/**
* Editor widths.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Breakpoint mixins
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.blocks-gallery-caption {
color: #555;
font-size: 13px;
text-align: center;
}
.is-dark-theme .blocks-gallery-caption {
color: rgba(255, 255, 255, 0.65);
}

Some files were not shown because too many files have changed in this diff Show More