Block Editor: Updated the WordPress packages to include Gutenberg 15.1.0 changes.

In addition to all the packages being updated to the latest versions, 
this commit also includes some mandatory changes to avoid editor breakage:

 - Update React to to 18.2.0.
 - Add the right stylesheets to support iframed block editors.

Props ntsekouras, mamaduka, flixos90, desrosj, peterwilsoncc.
See #57471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
youknowriad 2023-02-07 07:04:52 +00:00
parent 6b50b3e9fe
commit a41c798835
411 changed files with 85016 additions and 60548 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,11 +17,12 @@
function render_block_core_archives( $attributes ) {
$show_post_count = ! empty( $attributes['showPostCounts'] );
$type = isset( $attributes['type'] ) ? $attributes['type'] : 'monthly';
$class = '';
$class = 'wp-block-archives-list';
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$class .= ' wp-block-archives-dropdown';
$class = 'wp-block-archives-dropdown';
$dropdown_id = wp_unique_id( 'wp-block-archives-' );
$title = __( 'Archives' );
@ -40,9 +41,7 @@ function render_block_core_archives( $attributes ) {
$archives = wp_get_archives( $dropdown_args );
$classnames = esc_attr( $class );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) );
switch ( $dropdown_args['type'] ) {
case 'yearly':
@ -75,8 +74,6 @@ function render_block_core_archives( $attributes ) {
);
}
$class .= ' wp-block-archives-list';
/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
$archives_args = apply_filters(
'widget_archives_args',

View File

@ -26,6 +26,7 @@
},
"supports": {
"align": true,
"anchor": true,
"html": false,
"spacing": {
"margin": true,

View File

@ -1,3 +1,7 @@
.wp-block-archives{
box-sizing:border-box;
}
.wp-block-archives-dropdown label{
display:block;
}

View File

@ -1 +1 @@
.wp-block-archives-dropdown label{display:block}
.wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block}

View File

@ -1,3 +1,7 @@
.wp-block-archives{
box-sizing:border-box;
}
.wp-block-archives-dropdown label{
display:block;
}

View File

@ -1 +1 @@
.wp-block-archives-dropdown label{display:block}
.wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block}

View File

@ -100,7 +100,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
$label = 'aria-label="' . sprintf( esc_attr__( '(%s author archive, opens in a new tab)' ), $author_name ) . '"';
}
// translators: %1$s: Author archive link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
}
return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
}

View File

@ -4,7 +4,7 @@
"name": "core/avatar",
"title": "Avatar",
"category": "theme",
"description": "Add a user's avatar.",
"description": "Add a users avatar.",
"textdomain": "default",
"attributes": {
"userId": {
@ -25,6 +25,7 @@
},
"usesContext": [ "postType", "postId", "commentId" ],
"supports": {
"anchor": true,
"html": false,
"align": true,
"alignWide": false,

View File

@ -27,8 +27,7 @@ function render_block_core_block( $attributes ) {
if ( isset( $seen_refs[ $attributes['ref'] ] ) ) {
// WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent
// is set in `wp_debug_mode()`.
$is_debug = defined( 'WP_DEBUG' ) && WP_DEBUG &&
defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY;
$is_debug = WP_DEBUG && WP_DEBUG_DISPLAY;
return $is_debug ?
// translators: Visible only in the front end, this warning takes the place of a faulty block.

View File

@ -15,6 +15,5 @@
"customClassName": false,
"html": false,
"inserter": false
},
"editorStyle": "wp-block-editor"
}
}

View File

@ -7,4 +7,14 @@
}
.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{
display:none;
}
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected{
box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
}
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
}
.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff;
}

View File

@ -1 +1 @@
.edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container{padding-left:0;padding-right:0}.edit-post-visual-editor .block-library-block__reusable-block-container .block-editor-writing-flow{display:block}.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{display:none}
.edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container{padding-left:0;padding-right:0}.edit-post-visual-editor .block-library-block__reusable-block-container .block-editor-writing-flow{display:block}.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{display:none}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color)}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color)}.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff}

View File

@ -7,4 +7,14 @@
}
.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{
display:none;
}
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected{
box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
}
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
}
.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff;
}

View File

@ -1 +1 @@
.edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container{padding-left:0;padding-right:0}.edit-post-visual-editor .block-library-block__reusable-block-container .block-editor-writing-flow{display:block}.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{display:none}
.edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container{padding-left:0;padding-right:0}.edit-post-visual-editor .block-library-block__reusable-block-container .block-editor-writing-flow{display:block}.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{display:none}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color)}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color)}.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff}

File diff suppressed because one or more lines are too long

View File

@ -9,6 +9,9 @@
"keywords": [ "link" ],
"textdomain": "default",
"attributes": {
"textAlign": {
"type": "string"
},
"url": {
"type": "string",
"source": "attribute",
@ -56,7 +59,7 @@
},
"supports": {
"anchor": true,
"align": true,
"align": false,
"alignWide": false,
"color": {
"__experimentalSkipSerialization": true,
@ -80,6 +83,7 @@
}
},
"reusable": false,
"shadow": true,
"spacing": {
"__experimentalSkipSerialization": true,
"padding": [ "horizontal", "vertical" ],

View File

@ -40,11 +40,34 @@ function render_block_core_calendar( $attributes ) {
}
}
$color_block_styles = array();
// Text color.
$preset_text_color = array_key_exists( 'textColor', $attributes ) ? "var:preset|color|{$attributes['textColor']}" : null;
$custom_text_color = _wp_array_get( $attributes, array( 'style', 'color', 'text' ), null );
$color_block_styles['text'] = $preset_text_color ? $preset_text_color : $custom_text_color;
// Background Color.
$preset_background_color = array_key_exists( 'backgroundColor', $attributes ) ? "var:preset|color|{$attributes['backgroundColor']}" : null;
$custom_background_color = _wp_array_get( $attributes, array( 'style', 'color', 'background' ), null );
$color_block_styles['background'] = $preset_background_color ? $preset_background_color : $custom_background_color;
// Generate color styles and classes.
$styles = wp_style_engine_get_styles( array( 'color' => $color_block_styles ), array( 'convert_vars_to_classnames' => true ) );
$inline_styles = empty( $styles['css'] ) ? '' : sprintf( ' style="%s"', esc_attr( $styles['css'] ) );
$classnames = empty( $styles['classnames'] ) ? '' : ' ' . esc_attr( $styles['classnames'] );
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classnames .= ' has-link-color';
}
// Apply color classes and styles to the calendar.
$calendar = str_replace( '<table', '<table' . $inline_styles, get_calendar( true, false ) );
$calendar = str_replace( 'class="wp-calendar-table', 'class="wp-calendar-table' . $classnames, $calendar );
$wrapper_attributes = get_block_wrapper_attributes();
$output = sprintf(
'<div %1$s>%2$s</div>',
$wrapper_attributes,
get_calendar( true, false )
$calendar
);
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited

View File

@ -17,6 +17,16 @@
},
"supports": {
"align": true,
"anchor": true,
"color": {
"link": true,
"__experimentalSkipSerialization": [ "text", "background" ],
"__experimentalDefaultControls": {
"background": true,
"text": true
},
"__experimentalSelector": "table, th"
},
"typography": {
"fontSize": true,
"lineHeight": true,

View File

@ -1,24 +1,33 @@
.wp-block-calendar{
text-align:center;
}
.wp-block-calendar tbody td,.wp-block-calendar th{
border:1px solid #ddd;
.wp-block-calendar td,.wp-block-calendar th{
border:1px solid;
padding:.25em;
}
.wp-block-calendar tfoot td{
border:none;
.wp-block-calendar th{
font-weight:400;
}
.wp-block-calendar caption{
background-color:inherit;
}
.wp-block-calendar table{
border-collapse:collapse;
width:100%;
}
.wp-block-calendar table th{
background:#ddd;
font-weight:400;
}
.wp-block-calendar a{
text-decoration:underline;
}
.wp-block-calendar table caption,.wp-block-calendar table tbody{
.wp-block-calendar table:where(:not(.has-text-color)){
color:#40464d;
}
.wp-block-calendar table:where(:not(.has-text-color)) td,.wp-block-calendar table:where(:not(.has-text-color)) th{
border-color:#ddd;
}
.wp-block-calendar table.has-background th{
background-color:inherit;
}
.wp-block-calendar table.has-text-color th{
color:inherit;
}
:where(.wp-block-calendar table:not(.has-background) th){
background:#ddd;
}

View File

@ -1 +1 @@
.wp-block-calendar{text-align:center}.wp-block-calendar tbody td,.wp-block-calendar th{border:1px solid #ddd;padding:.25em}.wp-block-calendar tfoot td{border:none}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table th{background:#ddd;font-weight:400}.wp-block-calendar a{text-decoration:underline}.wp-block-calendar table caption,.wp-block-calendar table tbody{color:#40464d}
.wp-block-calendar{text-align:center}.wp-block-calendar td,.wp-block-calendar th{border:1px solid;padding:.25em}.wp-block-calendar th{font-weight:400}.wp-block-calendar caption{background-color:inherit}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table:where(:not(.has-text-color)){color:#40464d}.wp-block-calendar table:where(:not(.has-text-color)) td,.wp-block-calendar table:where(:not(.has-text-color)) th{border-color:#ddd}.wp-block-calendar table.has-background th{background-color:inherit}.wp-block-calendar table.has-text-color th{color:inherit}:where(.wp-block-calendar table:not(.has-background) th){background:#ddd}

View File

@ -1,24 +1,33 @@
.wp-block-calendar{
text-align:center;
}
.wp-block-calendar tbody td,.wp-block-calendar th{
border:1px solid #ddd;
.wp-block-calendar td,.wp-block-calendar th{
border:1px solid;
padding:.25em;
}
.wp-block-calendar tfoot td{
border:none;
.wp-block-calendar th{
font-weight:400;
}
.wp-block-calendar caption{
background-color:inherit;
}
.wp-block-calendar table{
border-collapse:collapse;
width:100%;
}
.wp-block-calendar table th{
background:#ddd;
font-weight:400;
}
.wp-block-calendar a{
text-decoration:underline;
}
.wp-block-calendar table caption,.wp-block-calendar table tbody{
.wp-block-calendar table:where(:not(.has-text-color)){
color:#40464d;
}
.wp-block-calendar table:where(:not(.has-text-color)) td,.wp-block-calendar table:where(:not(.has-text-color)) th{
border-color:#ddd;
}
.wp-block-calendar table.has-background th{
background-color:inherit;
}
.wp-block-calendar table.has-text-color th{
color:inherit;
}
:where(.wp-block-calendar table:not(.has-background) th){
background:#ddd;
}

View File

@ -1 +1 @@
.wp-block-calendar{text-align:center}.wp-block-calendar tbody td,.wp-block-calendar th{border:1px solid #ddd;padding:.25em}.wp-block-calendar tfoot td{border:none}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table th{background:#ddd;font-weight:400}.wp-block-calendar a{text-decoration:underline}.wp-block-calendar table caption,.wp-block-calendar table tbody{color:#40464d}
.wp-block-calendar{text-align:center}.wp-block-calendar td,.wp-block-calendar th{border:1px solid;padding:.25em}.wp-block-calendar th{font-weight:400}.wp-block-calendar caption{background-color:inherit}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table:where(:not(.has-text-color)){color:#40464d}.wp-block-calendar table:where(:not(.has-text-color)) td,.wp-block-calendar table:where(:not(.has-text-color)) th{border-color:#ddd}.wp-block-calendar table.has-background th{background-color:inherit}.wp-block-calendar table.has-text-color th{color:inherit}:where(.wp-block-calendar table:not(.has-background) th){background:#ddd}

View File

@ -14,7 +14,7 @@
*/
function render_block_core_categories( $attributes ) {
static $block_id = 0;
$block_id++;
++$block_id;
$args = array(
'echo' => false,

View File

@ -30,6 +30,7 @@
},
"supports": {
"align": true,
"anchor": true,
"html": false,
"spacing": {
"margin": true,

View File

@ -25,12 +25,15 @@ function render_block_core_comment_author_name( $attributes, $content, $block )
return '';
}
$classes = '';
$classes = array();
if ( isset( $attributes['textAlign'] ) ) {
$classes .= 'has-text-align-' . $attributes['textAlign'];
$classes[] = 'has-text-align-' . $attributes['textAlign'];
}
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classes[] = 'has-link-color';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
$comment_author = get_comment_author( $comment );
$link = get_comment_author_url( $comment );

View File

@ -22,6 +22,7 @@
},
"usesContext": [ "commentId" ],
"supports": {
"anchor": true,
"html": false,
"spacing": {
"margin": true,

View File

@ -49,12 +49,15 @@ function render_block_core_comment_content( $attributes, $content, $block ) {
}
}
$classes = '';
$classes = array();
if ( isset( $attributes['textAlign'] ) ) {
$classes .= 'has-text-align-' . $attributes['textAlign'];
$classes[] = 'has-text-align-' . $attributes['textAlign'];
}
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classes[] = 'has-link-color';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
return sprintf(
'<div %1$s>%2$s%3$s</div>',

View File

@ -14,6 +14,7 @@
}
},
"supports": {
"anchor": true,
"color": {
"gradients": true,
"link": true,

View File

@ -23,7 +23,7 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
return '';
}
$classes = '';
$classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : '';
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$formatted_date = get_comment_date(

View File

@ -18,6 +18,7 @@
},
"usesContext": [ "commentId" ],
"supports": {
"anchor": true,
"html": false,
"color": {
"gradients": true,

View File

@ -27,12 +27,15 @@ function render_block_core_comment_edit_link( $attributes, $content, $block ) {
$link_atts .= sprintf( 'target="%s"', esc_attr( $attributes['linkTarget'] ) );
}
$classes = '';
$classes = array();
if ( isset( $attributes['textAlign'] ) ) {
$classes .= 'has-text-align-' . $attributes['textAlign'];
$classes[] = 'has-text-align-' . $attributes['textAlign'];
}
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classes[] = 'has-link-color';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
return sprintf(
'<div %1$s><a href="%2$s" %3$s>%4$s</a></div>',

View File

@ -18,6 +18,7 @@
}
},
"supports": {
"anchor": true,
"html": false,
"color": {
"link": true,

View File

@ -34,7 +34,7 @@ function render_block_core_comment_reply_link( $attributes, $content, $block ) {
// Compute comment's depth iterating over its ancestors.
while ( ! empty( $parent_id ) ) {
$depth++;
++$depth;
$parent_id = get_comment( $parent_id )->comment_parent;
}
@ -51,12 +51,15 @@ function render_block_core_comment_reply_link( $attributes, $content, $block ) {
return;
}
$classes = '';
$classes = array();
if ( isset( $attributes['textAlign'] ) ) {
$classes .= 'has-text-align-' . $attributes['textAlign'];
$classes[] = 'has-text-align-' . $attributes['textAlign'];
}
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classes[] = 'has-link-color';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
return sprintf(
'<div %1$s>%2$s</div>',

View File

@ -14,6 +14,7 @@
}
},
"supports": {
"anchor": true,
"color": {
"gradients": true,
"link": true,

View File

@ -50,13 +50,13 @@ function block_core_comment_template_render_comments( $comments, $block ) {
// comments.
if ( ! empty( $children ) && ! empty( $thread_comments ) ) {
if ( $comment_depth < $thread_comments_depth ) {
$comment_depth += 1;
++$comment_depth;
$inner_content = block_core_comment_template_render_comments(
$children,
$block
);
$block_content .= sprintf( '<ol>%1$s</ol>', $inner_content );
$comment_depth -= 1;
--$comment_depth;
} else {
$inner_content = block_core_comment_template_render_comments(
$children,
@ -70,7 +70,6 @@ function block_core_comment_template_render_comments( $comments, $block ) {
}
return $content;
}
/**

View File

@ -9,9 +9,14 @@
"textdomain": "default",
"usesContext": [ "postId" ],
"supports": {
"reusable": false,
"html": false,
"align": true,
"anchor": true,
"html": false,
"reusable": false,
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,

View File

@ -1,4 +1,5 @@
.wp-block-comment-template{
box-sizing:border-box;
list-style:none;
margin-bottom:0;
max-width:100%;

View File

@ -1 +1 @@
.wp-block-comment-template{list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-right:2rem}.wp-block-comment-template.alignleft{float:right}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:-moz-fit-content;width:fit-content}.wp-block-comment-template.alignright{float:left}
.wp-block-comment-template{box-sizing:border-box;list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-right:2rem}.wp-block-comment-template.alignleft{float:right}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:-moz-fit-content;width:fit-content}.wp-block-comment-template.alignright{float:left}

View File

@ -1,4 +1,5 @@
.wp-block-comment-template{
box-sizing:border-box;
list-style:none;
margin-bottom:0;
max-width:100%;

View File

@ -1 +1 @@
.wp-block-comment-template{list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-left:2rem}.wp-block-comment-template.alignleft{float:left}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:-moz-fit-content;width:fit-content}.wp-block-comment-template.alignright{float:right}
.wp-block-comment-template{box-sizing:border-box;list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-left:2rem}.wp-block-comment-template.alignleft{float:left}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:-moz-fit-content;width:fit-content}.wp-block-comment-template.alignright{float:right}

View File

@ -14,6 +14,7 @@
},
"usesContext": [ "postId", "comments/paginationArrow" ],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"color": {

View File

@ -9,8 +9,16 @@
"textdomain": "default",
"usesContext": [ "postId" ],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"color": {
"gradients": true,
"text": false,
"__experimentalDefaultControls": {
"background": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,

View File

@ -14,6 +14,7 @@
},
"usesContext": [ "postId", "comments/paginationArrow" ],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"color": {

View File

@ -22,9 +22,12 @@ function render_block_core_comments_pagination( $attributes, $content ) {
return;
}
$classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : '';
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
return sprintf(
'<div %1$s>%2$s</div>',
get_block_wrapper_attributes(),
$wrapper_attributes,
$content
);
}

View File

@ -17,6 +17,7 @@
"comments/paginationArrow": "paginationArrow"
},
"supports": {
"anchor": true,
"align": true,
"reusable": false,
"html": false,

View File

@ -202,7 +202,6 @@ function register_legacy_post_comments_block() {
'wp-block-buttons',
'wp-block-button',
),
'editorStyle' => 'wp-block-post-comments-editor',
'render_callback' => 'render_block_core_comments',
'skip_inner_blocks' => true,
);

View File

@ -18,6 +18,7 @@
},
"supports": {
"align": [ "wide", "full" ],
"anchor": true,
"html": false,
"color": {
"gradients": true,
@ -28,6 +29,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,

View File

@ -1,3 +1,6 @@
.wp-block-comments__legacy-placeholder,.wp-block-post-comments{
box-sizing:border-box;
}
.wp-block-comments__legacy-placeholder .alignleft,.wp-block-post-comments .alignleft{
float:right;
}

View File

@ -1 +1 @@
.wp-block-comments__legacy-placeholder .alignleft,.wp-block-post-comments .alignleft{float:right}.wp-block-comments__legacy-placeholder .alignright,.wp-block-post-comments .alignright{float:left}.wp-block-comments__legacy-placeholder .navigation:after,.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-comments__legacy-placeholder .commentlist,.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-comments__legacy-placeholder .commentlist .comment,.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-comments__legacy-placeholder .commentlist .comment p,.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-comments__legacy-placeholder .commentlist .children,.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-comments__legacy-placeholder .comment-author,.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-comments__legacy-placeholder .comment-author .avatar,.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;margin-top:.5em;width:2.5em}.wp-block-comments__legacy-placeholder .comment-author cite,.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-comments__legacy-placeholder .comment-meta,.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-comments__legacy-placeholder .comment-meta b,.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-comments__legacy-placeholder .comment-meta .comment-awaiting-moderation,.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-comments__legacy-placeholder .comment-body .commentmetadata,.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-comments__legacy-placeholder .comment-form-author label,.wp-block-comments__legacy-placeholder .comment-form-comment label,.wp-block-comments__legacy-placeholder .comment-form-email label,.wp-block-comments__legacy-placeholder .comment-form-url label,.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-comments__legacy-placeholder .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-comments__legacy-placeholder .comment-form textarea,.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-comments__legacy-placeholder .comment-form-cookies-consent,.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-comments__legacy-placeholder .comment-form-cookies-consent #wp-comment-cookies-consent,.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-comments__legacy-placeholder .comment-reply-title,.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-comments__legacy-placeholder .comment-reply-title :where(small),.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-comments__legacy-placeholder .reply,.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-comments__legacy-placeholder input:not([type=submit]),.wp-block-comments__legacy-placeholder textarea,.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-comments__legacy-placeholder input:not([type=submit]):not([type=checkbox]),.wp-block-comments__legacy-placeholder textarea,.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.block-library-comments-toolbar__popover .components-popover__content{min-width:230px}.wp-block-comments__legacy-placeholder *{pointer-events:none}
.wp-block-comments__legacy-placeholder,.wp-block-post-comments{box-sizing:border-box}.wp-block-comments__legacy-placeholder .alignleft,.wp-block-post-comments .alignleft{float:right}.wp-block-comments__legacy-placeholder .alignright,.wp-block-post-comments .alignright{float:left}.wp-block-comments__legacy-placeholder .navigation:after,.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-comments__legacy-placeholder .commentlist,.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-comments__legacy-placeholder .commentlist .comment,.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-comments__legacy-placeholder .commentlist .comment p,.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-comments__legacy-placeholder .commentlist .children,.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-comments__legacy-placeholder .comment-author,.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-comments__legacy-placeholder .comment-author .avatar,.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;margin-top:.5em;width:2.5em}.wp-block-comments__legacy-placeholder .comment-author cite,.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-comments__legacy-placeholder .comment-meta,.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-comments__legacy-placeholder .comment-meta b,.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-comments__legacy-placeholder .comment-meta .comment-awaiting-moderation,.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-comments__legacy-placeholder .comment-body .commentmetadata,.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-comments__legacy-placeholder .comment-form-author label,.wp-block-comments__legacy-placeholder .comment-form-comment label,.wp-block-comments__legacy-placeholder .comment-form-email label,.wp-block-comments__legacy-placeholder .comment-form-url label,.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-comments__legacy-placeholder .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-comments__legacy-placeholder .comment-form textarea,.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-comments__legacy-placeholder .comment-form-cookies-consent,.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-comments__legacy-placeholder .comment-form-cookies-consent #wp-comment-cookies-consent,.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-comments__legacy-placeholder .comment-reply-title,.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-comments__legacy-placeholder .comment-reply-title :where(small),.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-comments__legacy-placeholder .reply,.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-comments__legacy-placeholder input:not([type=submit]),.wp-block-comments__legacy-placeholder textarea,.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-comments__legacy-placeholder input:not([type=submit]):not([type=checkbox]),.wp-block-comments__legacy-placeholder textarea,.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.block-library-comments-toolbar__popover .components-popover__content{min-width:230px}.wp-block-comments__legacy-placeholder *{pointer-events:none}

View File

@ -1,3 +1,6 @@
.wp-block-comments__legacy-placeholder,.wp-block-post-comments{
box-sizing:border-box;
}
.wp-block-comments__legacy-placeholder .alignleft,.wp-block-post-comments .alignleft{
float:left;
}

View File

@ -1 +1 @@
.wp-block-comments__legacy-placeholder .alignleft,.wp-block-post-comments .alignleft{float:left}.wp-block-comments__legacy-placeholder .alignright,.wp-block-post-comments .alignright{float:right}.wp-block-comments__legacy-placeholder .navigation:after,.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-comments__legacy-placeholder .commentlist,.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-comments__legacy-placeholder .commentlist .comment,.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-comments__legacy-placeholder .commentlist .comment p,.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-comments__legacy-placeholder .commentlist .children,.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-comments__legacy-placeholder .comment-author,.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-comments__legacy-placeholder .comment-author .avatar,.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;margin-top:.5em;width:2.5em}.wp-block-comments__legacy-placeholder .comment-author cite,.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-comments__legacy-placeholder .comment-meta,.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-comments__legacy-placeholder .comment-meta b,.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-comments__legacy-placeholder .comment-meta .comment-awaiting-moderation,.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-comments__legacy-placeholder .comment-body .commentmetadata,.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-comments__legacy-placeholder .comment-form-author label,.wp-block-comments__legacy-placeholder .comment-form-comment label,.wp-block-comments__legacy-placeholder .comment-form-email label,.wp-block-comments__legacy-placeholder .comment-form-url label,.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-comments__legacy-placeholder .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-comments__legacy-placeholder .comment-form textarea,.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-comments__legacy-placeholder .comment-form-cookies-consent,.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-comments__legacy-placeholder .comment-form-cookies-consent #wp-comment-cookies-consent,.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-comments__legacy-placeholder .comment-reply-title,.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-comments__legacy-placeholder .comment-reply-title :where(small),.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-comments__legacy-placeholder .reply,.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-comments__legacy-placeholder input:not([type=submit]),.wp-block-comments__legacy-placeholder textarea,.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-comments__legacy-placeholder input:not([type=submit]):not([type=checkbox]),.wp-block-comments__legacy-placeholder textarea,.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.block-library-comments-toolbar__popover .components-popover__content{min-width:230px}.wp-block-comments__legacy-placeholder *{pointer-events:none}
.wp-block-comments__legacy-placeholder,.wp-block-post-comments{box-sizing:border-box}.wp-block-comments__legacy-placeholder .alignleft,.wp-block-post-comments .alignleft{float:left}.wp-block-comments__legacy-placeholder .alignright,.wp-block-post-comments .alignright{float:right}.wp-block-comments__legacy-placeholder .navigation:after,.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-comments__legacy-placeholder .commentlist,.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-comments__legacy-placeholder .commentlist .comment,.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-comments__legacy-placeholder .commentlist .comment p,.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-comments__legacy-placeholder .commentlist .children,.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-comments__legacy-placeholder .comment-author,.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-comments__legacy-placeholder .comment-author .avatar,.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;margin-top:.5em;width:2.5em}.wp-block-comments__legacy-placeholder .comment-author cite,.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-comments__legacy-placeholder .comment-meta,.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-comments__legacy-placeholder .comment-meta b,.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-comments__legacy-placeholder .comment-meta .comment-awaiting-moderation,.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-comments__legacy-placeholder .comment-body .commentmetadata,.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-comments__legacy-placeholder .comment-form-author label,.wp-block-comments__legacy-placeholder .comment-form-comment label,.wp-block-comments__legacy-placeholder .comment-form-email label,.wp-block-comments__legacy-placeholder .comment-form-url label,.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-comments__legacy-placeholder .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-comments__legacy-placeholder .comment-form textarea,.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-comments__legacy-placeholder .comment-form-cookies-consent,.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-comments__legacy-placeholder .comment-form-cookies-consent #wp-comment-cookies-consent,.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-comments__legacy-placeholder .comment-reply-title,.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-comments__legacy-placeholder .comment-reply-title :where(small),.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-comments__legacy-placeholder .reply,.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-comments__legacy-placeholder input:not([type=submit]),.wp-block-comments__legacy-placeholder textarea,.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-comments__legacy-placeholder input:not([type=submit]):not([type=checkbox]),.wp-block-comments__legacy-placeholder textarea,.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.block-library-comments-toolbar__popover .components-popover__content{min-width:230px}.wp-block-comments__legacy-placeholder *{pointer-events:none}

View File

@ -1,3 +1,6 @@
.wp-block-post-comments{
box-sizing:border-box;
}
.wp-block-post-comments .alignleft{
float:right;
}

View File

@ -1 +1 @@
.wp-block-post-comments .alignleft{float:right}.wp-block-post-comments .alignright{float:left}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}
.wp-block-post-comments{box-sizing:border-box}.wp-block-post-comments .alignleft{float:right}.wp-block-post-comments .alignright{float:left}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}

View File

@ -1,3 +1,6 @@
.wp-block-post-comments{
box-sizing:border-box;
}
.wp-block-post-comments .alignleft{
float:left;
}

View File

@ -1 +1 @@
.wp-block-post-comments .alignleft{float:left}.wp-block-post-comments .alignright{float:right}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}
.wp-block-post-comments{box-sizing:border-box}.wp-block-post-comments .alignleft{float:left}.wp-block-post-comments .alignright{float:right}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}

View File

@ -74,6 +74,10 @@
"templateLock": {
"type": [ "string", "boolean" ],
"enum": [ "all", "insert", "contentOnly", false ]
},
"tagName": {
"type": "string",
"default": "div"
}
},
"usesContext": [ "postId", "postType" ],

View File

@ -80,4 +80,8 @@
.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){
margin-top:24px;
}
.wp-block-cover:after{
min-height:auto;
}

View File

@ -1 +1 @@
.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{justify-content:flex-start;min-height:240px;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{display:block;min-height:240px}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:right}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[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{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.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}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}
.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{justify-content:flex-start;min-height:240px;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{display:block;min-height:240px}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:right}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[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{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.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}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}.wp-block-cover:after{min-height:auto}

View File

@ -80,4 +80,8 @@
.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){
margin-top:24px;
}
.wp-block-cover:after{
min-height:auto;
}

View File

@ -1 +1 @@
.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{justify-content:flex-start;min-height:240px;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{display:block;min-height:240px}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:left}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[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{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.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}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}
.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{justify-content:flex-start;min-height:240px;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{display:block;min-height:240px}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:left}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[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{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.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}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}.wp-block-cover:after{min-height:auto}

View File

@ -8,18 +8,22 @@
"textdomain": "default",
"attributes": {
"url": {
"type": "string"
"type": "string",
"__experimentalRole": "content"
},
"caption": {
"type": "string",
"source": "html",
"selector": "figcaption"
"selector": "figcaption",
"__experimentalRole": "content"
},
"type": {
"type": "string"
"type": "string",
"__experimentalRole": "content"
},
"providerNameSlug": {
"type": "string"
"type": "string",
"__experimentalRole": "content"
},
"allowResponsive": {
"type": "boolean",
@ -27,11 +31,13 @@
},
"responsive": {
"type": "boolean",
"default": false
"default": false,
"__experimentalRole": "content"
},
"previewable": {
"type": "boolean",
"default": true
"default": true,
"__experimentalRole": "content"
}
},
"supports": {

View File

@ -76,13 +76,10 @@ function block_core_gallery_render( $attributes, $content ) {
}
}
$class = wp_unique_id( 'wp-block-gallery-' );
$content = preg_replace(
'/' . preg_quote( 'class="', '/' ) . '/',
'class="' . $class . ' ',
$content,
1
);
$unique_gallery_classname = wp_unique_id( 'wp-block-gallery-' );
$processed_content = new WP_HTML_Tag_Processor( $content );
$processed_content->next_tag();
$processed_content->add_class( $unique_gallery_classname );
// --gallery-block--gutter-size is deprecated. --wp--style--gallery-gap-default should be used by themes that want to set a default
// gap on the gallery.
@ -102,10 +99,22 @@ function block_core_gallery_render( $attributes, $content ) {
}
// Set the CSS variable to the column value, and the `gap` property to the combined gap value.
$style = '.wp-block-gallery.' . $class . '{ --wp--style--unstable-gallery-gap: ' . $gap_column . '; gap: ' . $gap_value . '}';
$gallery_styles = array();
$gallery_styles[] = array(
'selector' => ".wp-block-gallery.{$unique_gallery_classname}",
'declarations' => array(
'--wp--style--unstable-gallery-gap' => $gap_column,
'gap' => $gap_value,
),
);
wp_enqueue_block_support_styles( $style, 11 );
return $content;
wp_style_engine_get_stylesheet_from_css_rules(
$gallery_styles,
array(
'context' => 'block-supports',
)
);
return (string) $processed_content;
}
/**
* Registers the `core/gallery` block on server.

View File

@ -108,7 +108,7 @@ figure.wp-block-gallery .components-spinner{
}
}
.block-library-gallery-item__inline-menu:hover{
box-shadow:0 2px 6px rgba(0,0,0,.05);
box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1);
}
@media (min-width:600px){
.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{

View File

@ -1 +1 @@
figure.wp-block-gallery{display:block}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{left:5px;position:absolute;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.gallery-settings-buttons .components-button:first-child{margin-left:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 4px 0 8px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid transparent;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 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{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{right:-2px}.block-library-gallery-item__inline-menu.is-right{left:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}
figure.wp-block-gallery{display:block}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{left:5px;position:absolute;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.gallery-settings-buttons .components-button:first-child{margin-left:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 4px 0 8px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid transparent;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1)}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{right:-2px}.block-library-gallery-item__inline-menu.is-right{left:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}

View File

@ -108,7 +108,7 @@ figure.wp-block-gallery .components-spinner{
}
}
.block-library-gallery-item__inline-menu:hover{
box-shadow:0 2px 6px rgba(0,0,0,.05);
box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1);
}
@media (min-width:600px){
.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{

View File

@ -1 +1 @@
figure.wp-block-gallery{display:block}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;right:5px;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.gallery-settings-buttons .components-button:first-child{margin-right:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 8px 0 4px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid transparent;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 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{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{left:-2px}.block-library-gallery-item__inline-menu.is-right{right:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}
figure.wp-block-gallery{display:block}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;right:5px;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.gallery-settings-buttons .components-button:first-child{margin-right:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 8px 0 4px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid transparent;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1)}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{left:-2px}.block-library-gallery-item__inline-menu.is-right{right:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}

View File

@ -41,6 +41,9 @@
"blockGap": true
}
},
"dimensions": {
"minHeight": true
},
"__experimentalBorder": {
"color": true,
"radius": true,
@ -53,6 +56,9 @@
"width": true
}
},
"position": {
"sticky": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
@ -66,7 +72,9 @@
"fontSize": true
}
},
"__experimentalLayout": true
"__experimentalLayout": {
"allowSizingOnChildren": true
}
},
"editorStyle": "wp-block-group-editor",
"style": "wp-block-group"

View File

@ -31,6 +31,60 @@
min-height:46px;
pointer-events:none;
}
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{
background:currentColor;
bottom:0;
content:"";
left:0;
opacity:.1;
pointer-events:none;
position:absolute;
right:0;
top:0;
}
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{
pointer-events:all;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations{
display:flex;
flex-direction:row;
flex-wrap:wrap;
justify-content:center;
list-style:none;
margin:0;
padding:0;
width:100%;
}
.wp-block-group__placeholder .components-placeholder__instructions{
margin-bottom:18px;
text-align:center;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations svg{
fill:#ccc !important;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations svg:hover{
fill:var(--wp-admin-theme-color) !important;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations>li{
align-items:center;
display:flex;
flex-direction:column;
margin:0 12px 12px;
width:auto;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button{
height:32px;
padding:0;
width:44px;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button:hover{
box-shadow:none;
}
.wp-block-group__placeholder .components-placeholder{
min-height:auto;
padding:24px;
}
.wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations>li,.wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations>li{
margin:12px;
}

View File

@ -1 +1 @@
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}.wp-block-group__placeholder .wp-block-group-placeholder__variations{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;list-style:none;margin:0;padding:0;width:100%}.wp-block-group__placeholder .components-placeholder__instructions{margin-bottom:18px;text-align:center}.wp-block-group__placeholder .wp-block-group-placeholder__variations svg{fill:#ccc!important}.wp-block-group__placeholder .wp-block-group-placeholder__variations svg:hover{fill:var(--wp-admin-theme-color)!important}.wp-block-group__placeholder .wp-block-group-placeholder__variations>li{align-items:center;display:flex;flex-direction:column;margin:0 12px 12px;width:auto}.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button{height:32px;padding:0;width:44px}.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button:hover{box-shadow:none}.wp-block-group__placeholder .components-placeholder{min-height:auto;padding:24px}.wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations>li,.wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations>li{margin:12px}

View File

@ -31,6 +31,60 @@
min-height:46px;
pointer-events:none;
}
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{
background:currentColor;
bottom:0;
content:"";
left:0;
opacity:.1;
pointer-events:none;
position:absolute;
right:0;
top:0;
}
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{
pointer-events:all;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations{
display:flex;
flex-direction:row;
flex-wrap:wrap;
justify-content:center;
list-style:none;
margin:0;
padding:0;
width:100%;
}
.wp-block-group__placeholder .components-placeholder__instructions{
margin-bottom:18px;
text-align:center;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations svg{
fill:#ccc !important;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations svg:hover{
fill:var(--wp-admin-theme-color) !important;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations>li{
align-items:center;
display:flex;
flex-direction:column;
margin:0 12px 12px;
width:auto;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button{
height:32px;
padding:0;
width:44px;
}
.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button:hover{
box-shadow:none;
}
.wp-block-group__placeholder .components-placeholder{
min-height:auto;
padding:24px;
}
.wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations>li,.wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations>li{
margin:12px;
}

View File

@ -1 +1 @@
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}.wp-block-group__placeholder .wp-block-group-placeholder__variations{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;list-style:none;margin:0;padding:0;width:100%}.wp-block-group__placeholder .components-placeholder__instructions{margin-bottom:18px;text-align:center}.wp-block-group__placeholder .wp-block-group-placeholder__variations svg{fill:#ccc!important}.wp-block-group__placeholder .wp-block-group-placeholder__variations svg:hover{fill:var(--wp-admin-theme-color)!important}.wp-block-group__placeholder .wp-block-group-placeholder__variations>li{align-items:center;display:flex;flex-direction:column;margin:0 12px 12px;width:auto}.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button{height:32px;padding:0;width:44px}.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button:hover{box-shadow:none}.wp-block-group__placeholder .components-placeholder{min-height:auto;padding:24px}.wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations>li,.wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations>li{margin:12px}

View File

@ -0,0 +1,52 @@
<?php
/**
* Appending the wp-block-heading to before rendering the stored `core/heading` block contents.
*
* @package WordPress
*/
/**
* Adds a wp-block-heading class to the heading block content.
*
* For example, the following block content:
* <h2 class="align-left">Hello World</h2>
*
* Would be transformed to:
* <h2 class="align-left wp-block-heading">Hello World</h2>
*
* @param array $attributes Attributes of the block being rendered.
* @param string $content Content of the block being rendered.
*
* @return string The content of the block being rendered.
*/
function block_core_heading_render( $attributes, $content ) {
if ( ! $content ) {
return $content;
}
$p = new WP_HTML_Tag_Processor( $content );
$header_tags = array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' );
while ( $p->next_tag() ) {
if ( in_array( $p->get_tag(), $header_tags, true ) ) {
$p->add_class( 'wp-block-heading' );
break;
}
}
return $p->get_updated_html();
}
/**
* Registers the `core/heading` block on server.
*/
function register_block_core_heading() {
register_block_type_from_metadata(
__DIR__ . '/heading',
array(
'render_callback' => 'block_core_heading_render',
)
);
}
add_action( 'init', 'register_block_core_heading' );

View File

@ -29,7 +29,7 @@
"supports": {
"align": [ "wide", "full" ],
"anchor": true,
"className": false,
"className": true,
"color": {
"gradients": true,
"link": true,
@ -57,7 +57,6 @@
"textTransform": true
}
},
"__experimentalSelector": "h1,h2,h3,h4,h5,h6",
"__unstablePasteTextInline": true,
"__experimentalSlashInserter": true
},

View File

@ -128,7 +128,7 @@ function render_block_core_home_link( $attributes, $content, $block ) {
$aria_current = is_home() || ( is_front_page() && 'page' === get_option( 'show_on_front' ) ) ? ' aria-current="page"' : '';
return sprintf(
'<li %1$s><a class="wp-block-home-link__content wp-block-navigation-item__content" href="%2$s" "rel="home"%3$s>%4$s</a></li>',
'<li %1$s><a class="wp-block-home-link__content wp-block-navigation-item__content" href="%2$s" rel="home"%3$s>%4$s</a></li>',
block_core_home_link_build_li_wrapper_attributes( $block->context ),
esc_url( home_url() ),
$aria_current,

View File

@ -22,6 +22,7 @@
"style"
],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"typography": {

View File

@ -10,7 +10,7 @@
"attributes": {
"content": {
"type": "string",
"source": "html"
"source": "raw"
}
},
"supports": {

View File

@ -12,6 +12,9 @@
.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{
display:none;
}
.wp-block-image.wp-block-image.is-selected .components-placeholder:before{
opacity:0;
}
.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{
transition:none;
}
@ -37,7 +40,7 @@ figure.wp-block-image:not(.wp-block){
}
.wp-block-image .components-resizable-box__container{
display:inline-block;
display:table;
}
.wp-block-image .components-resizable-box__container img{
display:block;
@ -109,15 +112,6 @@ figure.wp-block-image:not(.wp-block){
min-width:260px;
overflow:visible !important;
}
.wp-block-image__zoom .components-range-control{
flex:1;
}
.wp-block-image__zoom .components-base-control__field{
align-items:flex-start;
display:flex;
flex-direction:column;
margin-bottom:0;
}
.wp-block-image__aspect-ratio{
align-items:center;

View File

@ -1 +1 @@
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image .components-resizable-box__container{display:inline-block}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__zoom .components-range-control{flex:1}.wp-block-image__zoom .components-base-control__field{align-items:flex-start;display:flex;flex-direction:column;margin-bottom:0}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}

View File

@ -12,6 +12,9 @@
.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{
display:none;
}
.wp-block-image.wp-block-image.is-selected .components-placeholder:before{
opacity:0;
}
.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{
transition:none;
}
@ -37,7 +40,7 @@ figure.wp-block-image:not(.wp-block){
}
.wp-block-image .components-resizable-box__container{
display:inline-block;
display:table;
}
.wp-block-image .components-resizable-box__container img{
display:block;
@ -109,15 +112,6 @@ figure.wp-block-image:not(.wp-block){
min-width:260px;
overflow:visible !important;
}
.wp-block-image__zoom .components-range-control{
flex:1;
}
.wp-block-image__zoom .components-base-control__field{
align-items:flex-start;
display:flex;
flex-direction:column;
margin-bottom:0;
}
.wp-block-image__aspect-ratio{
align-items:center;

View File

@ -1 +1 @@
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image .components-resizable-box__container{display:inline-block}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__zoom .components-range-control{flex:1}.wp-block-image__zoom .components-base-control__field{align-items:flex-start;display:flex;flex-direction:column;margin-bottom:0}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}

View File

@ -29,7 +29,12 @@
},
"supports": {
"align": true,
"html": false
"anchor": true,
"html": false,
"spacing": {
"margin": true,
"padding": true
}
},
"editorStyle": "wp-block-latest-comments-editor",
"style": "wp-block-latest-comments"

View File

@ -1,4 +1,5 @@
ol.wp-block-latest-comments{
box-sizing:border-box;
margin-right:0;
}

View File

@ -1 +1 @@
ol.wp-block-latest-comments{margin-right:0}.wp-block-latest-comments .wp-block-latest-comments{padding-right:0}.wp-block-latest-comments__comment{line-height:1.1;list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-right:3.25em}.has-dates .wp-block-latest-comments__comment,.has-excerpts .wp-block-latest-comments__comment{line-height:1.5}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;line-height:1.8;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;width:2.5em}
ol.wp-block-latest-comments{box-sizing:border-box;margin-right:0}.wp-block-latest-comments .wp-block-latest-comments{padding-right:0}.wp-block-latest-comments__comment{line-height:1.1;list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-right:3.25em}.has-dates .wp-block-latest-comments__comment,.has-excerpts .wp-block-latest-comments__comment{line-height:1.5}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;line-height:1.8;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;width:2.5em}

View File

@ -1,4 +1,5 @@
ol.wp-block-latest-comments{
box-sizing:border-box;
margin-left:0;
}

View File

@ -1 +1 @@
ol.wp-block-latest-comments{margin-left:0}.wp-block-latest-comments .wp-block-latest-comments{padding-left:0}.wp-block-latest-comments__comment{line-height:1.1;list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-left:3.25em}.has-dates .wp-block-latest-comments__comment,.has-excerpts .wp-block-latest-comments__comment{line-height:1.5}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;line-height:1.8;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;width:2.5em}
ol.wp-block-latest-comments{box-sizing:border-box;margin-left:0}.wp-block-latest-comments .wp-block-latest-comments{padding-left:0}.wp-block-latest-comments__comment{line-height:1.1;list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-left:3.25em}.has-dates .wp-block-latest-comments__comment,.has-excerpts .wp-block-latest-comments__comment{line-height:1.5}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;line-height:1.8;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;width:2.5em}

View File

@ -55,7 +55,7 @@ function render_block_core_latest_posts( $attributes ) {
$args['author'] = $attributes['selectedAuthor'];
}
$query = new WP_Query;
$query = new WP_Query();
$recent_posts = $query->query( $args );
if ( isset( $attributes['displayFeaturedImage'] ) && $attributes['displayFeaturedImage'] ) {
@ -173,25 +173,24 @@ function render_block_core_latest_posts( $attributes ) {
remove_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 );
$class = 'wp-block-latest-posts__list';
$classes = array( 'wp-block-latest-posts__list' );
if ( isset( $attributes['postLayout'] ) && 'grid' === $attributes['postLayout'] ) {
$class .= ' is-grid';
$classes[] = 'is-grid';
}
if ( isset( $attributes['columns'] ) && 'grid' === $attributes['postLayout'] ) {
$class .= ' columns-' . $attributes['columns'];
$classes[] = 'columns-' . $attributes['columns'];
}
if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) {
$class .= ' has-dates';
$classes[] = 'has-dates';
}
if ( isset( $attributes['displayAuthor'] ) && $attributes['displayAuthor'] ) {
$class .= ' has-author';
$classes[] = 'has-author';
}
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classes[] = 'has-link-color';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
return sprintf(
'<ul %1$s>%2$s</ul>',

View File

@ -84,7 +84,21 @@
},
"supports": {
"align": true,
"anchor": true,
"html": false,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,

View File

@ -1,3 +1,6 @@
.wp-block-latest-posts{
box-sizing:border-box;
}
.wp-block-latest-posts.alignleft{
margin-right:2em;
}

View File

@ -1 +1 @@
.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-right:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 0 1.25em 1.25em;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-left:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-left:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-left:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-left:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-left:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}
.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-right:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 0 1.25em 1.25em;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-left:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-left:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-left:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-left:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-left:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}

View File

@ -1,3 +1,6 @@
.wp-block-latest-posts{
box-sizing:border-box;
}
.wp-block-latest-posts.alignleft{
margin-right:2em;
}

View File

@ -1 +1 @@
.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-left:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}
.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-left:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}

View File

@ -21,6 +21,19 @@
},
"supports": {
"className": false,
"__experimentalSelector": "li"
"__experimentalSelector": "li",
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
}
}

View File

@ -18,6 +18,7 @@
}
},
"supports": {
"anchor": true,
"className": true,
"typography": {
"fontSize": false

View File

@ -120,6 +120,33 @@ function block_core_navigation_link_render_submenu_icon() {
return '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg>';
}
/**
* Decodes a url if it's encoded, returning the same url if not.
*
* @param string $url The url to decode.
*
* @return string $url Returns the decoded url.
*/
function block_core_navigation_link_maybe_urldecode( $url ) {
$is_url_encoded = false;
$query = parse_url( $url, PHP_URL_QUERY );
$query_params = wp_parse_args( $query );
foreach ( $query_params as $query_param ) {
if ( rawurldecode( $query_param ) !== $query_param ) {
$is_url_encoded = true;
break;
}
}
if ( $is_url_encoded ) {
return rawurldecode( $url );
}
return $url;
}
/**
* Renders the `core/navigation-link` block.
*
@ -171,7 +198,7 @@ function render_block_core_navigation_link( $attributes, $content, $block ) {
// Start appending HTML attributes to anchor tag.
if ( isset( $attributes['url'] ) ) {
$html .= ' href="' . esc_url( $attributes['url'] ) . '"';
$html .= ' href="' . esc_url( block_core_navigation_link_maybe_urldecode( $attributes['url'] ) ) . '"';
}
if ( $is_active ) {
@ -344,3 +371,35 @@ function register_block_core_navigation_link() {
);
}
add_action( 'init', 'register_block_core_navigation_link' );
/**
* Enables animation of the block inspector for the Navigation Link block.
*
* See:
* - https://github.com/WordPress/gutenberg/pull/46342
* - https://github.com/WordPress/gutenberg/issues/45884
*
* @param array $settings Default editor settings.
* @return array Filtered editor settings.
*/
function block_core_navigation_link_enable_inspector_animation( $settings ) {
$current_animation_settings = _wp_array_get(
$settings,
array( '__experimentalBlockInspectorAnimation' ),
array()
);
$settings['__experimentalBlockInspectorAnimation'] = array_merge(
$current_animation_settings,
array(
'core/navigation-link' =>
array(
'enterDirection' => 'rightToLeft',
),
)
);
return $settings;
}
add_filter( 'block_editor_settings_all', 'block_core_navigation_link_enable_inspector_animation' );

View File

@ -1,3 +1,6 @@
.wp-block-navigation .block-list-appender{
position:relative;
}
.wp-block-navigation .has-child{
cursor:pointer;
}

View File

@ -1 +1 @@
.wp-block-navigation .has-child{cursor:pointer}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{z-index:28}.wp-block-navigation .has-child:hover .wp-block-navigation__submenu-container{z-index:29}.wp-block-navigation .has-child.has-child-selected>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child.is-selected>.wp-block-navigation__submenu-container{height:auto!important;min-width:200px!important;opacity:1!important;overflow:visible!important;visibility:visible!important;width:auto!important}.wp-block-navigation-item .wp-block-navigation-item__content{cursor:text}.wp-block-navigation-item.is-editing,.wp-block-navigation-item.is-selected{min-width:20px}.wp-block-navigation-item .block-list-appender{margin:16px 16px 16px auto}.wp-block-navigation-link__invalid-item{color:#000}.wp-block-navigation-link__missing_text-tooltip{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.wp-block-navigation-link__placeholder{background-image:none!important;box-shadow:none!important;position:relative;text-decoration:none!important}.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{--wp-underline-color:var(--wp-admin-theme-color);background-image:linear-gradient(-45deg,transparent 20%,var(--wp-underline-color) 30%,var(--wp-underline-color) 36%,transparent 46%),linear-gradient(-135deg,transparent 54%,var(--wp-underline-color) 64%,var(--wp-underline-color) 70%,transparent 80%);background-position:100% 100%;background-repeat:repeat-x;background-size:6px 3px;padding-bottom:.1em}.is-dark-theme .wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{--wp-underline-color:#fff}.wp-block-navigation-link__placeholder.wp-block-navigation-item__content{cursor:pointer}.link-control-transform{border-top:1px solid #ccc;padding:0 16px 8px}.link-control-transform__subheading{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.link-control-transform__items{display:flex;justify-content:space-between}.link-control-transform__item{flex-basis:33%;flex-direction:column;gap:8px;height:auto}
.wp-block-navigation .block-list-appender{position:relative}.wp-block-navigation .has-child{cursor:pointer}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{z-index:28}.wp-block-navigation .has-child:hover .wp-block-navigation__submenu-container{z-index:29}.wp-block-navigation .has-child.has-child-selected>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child.is-selected>.wp-block-navigation__submenu-container{height:auto!important;min-width:200px!important;opacity:1!important;overflow:visible!important;visibility:visible!important;width:auto!important}.wp-block-navigation-item .wp-block-navigation-item__content{cursor:text}.wp-block-navigation-item.is-editing,.wp-block-navigation-item.is-selected{min-width:20px}.wp-block-navigation-item .block-list-appender{margin:16px 16px 16px auto}.wp-block-navigation-link__invalid-item{color:#000}.wp-block-navigation-link__missing_text-tooltip{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.wp-block-navigation-link__placeholder{background-image:none!important;box-shadow:none!important;position:relative;text-decoration:none!important}.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{--wp-underline-color:var(--wp-admin-theme-color);background-image:linear-gradient(-45deg,transparent 20%,var(--wp-underline-color) 30%,var(--wp-underline-color) 36%,transparent 46%),linear-gradient(-135deg,transparent 54%,var(--wp-underline-color) 64%,var(--wp-underline-color) 70%,transparent 80%);background-position:100% 100%;background-repeat:repeat-x;background-size:6px 3px;padding-bottom:.1em}.is-dark-theme .wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{--wp-underline-color:#fff}.wp-block-navigation-link__placeholder.wp-block-navigation-item__content{cursor:pointer}.link-control-transform{border-top:1px solid #ccc;padding:0 16px 8px}.link-control-transform__subheading{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.link-control-transform__items{display:flex;justify-content:space-between}.link-control-transform__item{flex-basis:33%;flex-direction:column;gap:8px;height:auto}

View File

@ -1,3 +1,6 @@
.wp-block-navigation .block-list-appender{
position:relative;
}
.wp-block-navigation .has-child{
cursor:pointer;
}

View File

@ -1 +1 @@
.wp-block-navigation .has-child{cursor:pointer}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{z-index:28}.wp-block-navigation .has-child:hover .wp-block-navigation__submenu-container{z-index:29}.wp-block-navigation .has-child.has-child-selected>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child.is-selected>.wp-block-navigation__submenu-container{height:auto!important;min-width:200px!important;opacity:1!important;overflow:visible!important;visibility:visible!important;width:auto!important}.wp-block-navigation-item .wp-block-navigation-item__content{cursor:text}.wp-block-navigation-item.is-editing,.wp-block-navigation-item.is-selected{min-width:20px}.wp-block-navigation-item .block-list-appender{margin:16px auto 16px 16px}.wp-block-navigation-link__invalid-item{color:#000}.wp-block-navigation-link__missing_text-tooltip{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.wp-block-navigation-link__placeholder{background-image:none!important;box-shadow:none!important;position:relative;text-decoration:none!important}.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{--wp-underline-color:var(--wp-admin-theme-color);background-image:linear-gradient(45deg,transparent 20%,var(--wp-underline-color) 30%,var(--wp-underline-color) 36%,transparent 46%),linear-gradient(135deg,transparent 54%,var(--wp-underline-color) 64%,var(--wp-underline-color) 70%,transparent 80%);background-position:0 100%;background-repeat:repeat-x;background-size:6px 3px;padding-bottom:.1em}.is-dark-theme .wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{--wp-underline-color:#fff}.wp-block-navigation-link__placeholder.wp-block-navigation-item__content{cursor:pointer}.link-control-transform{border-top:1px solid #ccc;padding:0 16px 8px}.link-control-transform__subheading{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.link-control-transform__items{display:flex;justify-content:space-between}.link-control-transform__item{flex-basis:33%;flex-direction:column;gap:8px;height:auto}
.wp-block-navigation .block-list-appender{position:relative}.wp-block-navigation .has-child{cursor:pointer}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{z-index:28}.wp-block-navigation .has-child:hover .wp-block-navigation__submenu-container{z-index:29}.wp-block-navigation .has-child.has-child-selected>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child.is-selected>.wp-block-navigation__submenu-container{height:auto!important;min-width:200px!important;opacity:1!important;overflow:visible!important;visibility:visible!important;width:auto!important}.wp-block-navigation-item .wp-block-navigation-item__content{cursor:text}.wp-block-navigation-item.is-editing,.wp-block-navigation-item.is-selected{min-width:20px}.wp-block-navigation-item .block-list-appender{margin:16px auto 16px 16px}.wp-block-navigation-link__invalid-item{color:#000}.wp-block-navigation-link__missing_text-tooltip{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.wp-block-navigation-link__placeholder{background-image:none!important;box-shadow:none!important;position:relative;text-decoration:none!important}.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{--wp-underline-color:var(--wp-admin-theme-color);background-image:linear-gradient(45deg,transparent 20%,var(--wp-underline-color) 30%,var(--wp-underline-color) 36%,transparent 46%),linear-gradient(135deg,transparent 54%,var(--wp-underline-color) 64%,var(--wp-underline-color) 70%,transparent 80%);background-position:0 100%;background-repeat:repeat-x;background-size:6px 3px;padding-bottom:.1em}.is-dark-theme .wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{--wp-underline-color:#fff}.wp-block-navigation-link__placeholder.wp-block-navigation-item__content{cursor:pointer}.link-control-transform{border-top:1px solid #ccc;padding:0 16px 8px}.link-control-transform__subheading{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.link-control-transform__items{display:flex;justify-content:space-between}.link-control-transform__item{flex-basis:33%;flex-direction:column;gap:8px;height:auto}

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