Editor: Sync changes from the Gutenberg plugin 14.1 release

Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1:

- @wordpress/a11y@3.17.1
 - @wordpress/annotations@2.17.2
 - @wordpress/api-fetch@6.14.1
 - @wordpress/autop@3.17.1
 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1
 - @wordpress/babel-plugin-makepot@5.1.1
 - @wordpress/babel-preset-default@7.1.1
 - @wordpress/base-styles@4.8.1
 - @wordpress/blob@3.17.1
 - @wordpress/block-directory@3.15.2
 - @wordpress/block-editor@10.0.2
 - @wordpress/block-library@7.14.2
 - @wordpress/block-serialization-default-parser@4.17.1
 - @wordpress/block-serialization-spec-parser@4.17.1
 - @wordpress/blocks@11.16.2
 - @wordpress/browserslist-config@5.0.1
 - @wordpress/components@21.0.2
 - @wordpress/compose@5.15.2
 - @wordpress/core-data@5.0.2
 - @wordpress/create-block-tutorial-template@2.5.1
 - @wordpress/create-block@4.1.1
 - @wordpress/custom-templated-path-webpack-plugin@2.1.3
 - @wordpress/customize-widgets@3.14.2
 - @wordpress/data-controls@2.17.2
 - @wordpress/data@7.1.2
 - @wordpress/date@4.17.1
 - @wordpress/dependency-extraction-webpack-plugin@4.0.2
 - @wordpress/deprecated@3.17.1
 - @wordpress/docgen@1.26.1
 - @wordpress/dom-ready@3.17.1
 - @wordpress/dom@3.17.2
 - @wordpress/e2e-test-utils@8.1.1
 - @wordpress/e2e-tests@5.1.2
 - @wordpress/edit-post@6.14.2
 - @wordpress/edit-site@4.14.2
 - @wordpress/edit-widgets@4.14.2
 - @wordpress/editor@12.16.2
 - @wordpress/element@4.15.1
 - @wordpress/env@5.2.1
 - @wordpress/escape-html@2.17.1
 - @wordpress/eslint-plugin@13.1.1
 - @wordpress/format-library@3.15.2
 - @wordpress/hooks@3.17.1
 - @wordpress/html-entities@3.17.1
 - @wordpress/i18n@4.17.1
 - @wordpress/icons@9.8.1
 - @wordpress/interface@4.16.2
 - @wordpress/is-shallow-equal@4.17.1
 - @wordpress/jest-console@6.0.1
 - @wordpress/jest-preset-default@9.0.1
 - @wordpress/jest-puppeteer-axe@5.0.1
 - @wordpress/keyboard-shortcuts@3.15.2
 - @wordpress/keycodes@3.17.1
 - @wordpress/lazy-import@1.4.3
 - @wordpress/library-export-default-webpack-plugin@2.3.3
 - @wordpress/list-reusable-blocks@3.15.2
 - @wordpress/media-utils@4.8.1
 - @wordpress/notices@3.17.2
 - @wordpress/npm-package-json-lint-config@4.2.1
 - @wordpress/nux@5.15.2
 - @wordpress/plugins@4.15.2
 - @wordpress/postcss-plugins-preset@4.1.1
 - @wordpress/postcss-themes@5.0.1
 - @wordpress/preferences-persistence@1.9.1
 - @wordpress/preferences@2.9.2
 - @wordpress/prettier-config@2.0.1
 - @wordpress/primitives@3.15.1
 - @wordpress/priority-queue@2.17.2
 - @wordpress/project-management-automation@1.16.1
 - @wordpress/react-i18n@3.15.1
 - @wordpress/readable-js-assets-webpack-plugin@2.0.1
 - @wordpress/redux-routine@4.17.1
 - @wordpress/reusable-blocks@3.15.2
 - @wordpress/rich-text@5.15.2
 - @wordpress/scripts@24.1.2
 - @wordpress/server-side-render@3.15.2
 - @wordpress/shortcode@3.17.1
 - @wordpress/style-engine@1.0.1
 - @wordpress/stylelint-config@21.0.1
 - @wordpress/token-list@2.17.1
 - @wordpress/url@3.18.1
 - @wordpress/viewport@4.15.2
 - @wordpress/warning@2.17.1
 - @wordpress/widgets@2.15.2
 - @wordpress/wordcount@3.17.1


Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini.
See #56467.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
gziolo 2022-09-20 15:43:29 +00:00
parent da4456672c
commit 1044eb572a
483 changed files with 68685 additions and 57914 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<?php return array('dependencies' => array('wp-react-refresh-runtime'), 'version' => '8151afc94a5ebc73b7a8229f0d7ee352');
<?php return array('dependencies' => array('wp-react-refresh-runtime'), 'version' => '794dd7047e2302828128');

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '4fb86f241c3b2d9d9e0411b507079823');
<?php return array('dependencies' => array(), 'version' => 'd4cdced5a2afff4a8cc2');

View File

@ -62,9 +62,11 @@ function render_block_core_archives( $attributes ) {
break;
}
$block_content = '<label for="' . esc_attr( $dropdown_id ) . '">' . esc_html( $title ) . '</label>
<select id="' . esc_attr( $dropdown_id ) . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value="">' . esc_html( $label ) . '</option>' . $archives . '</select>';
$show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';
$block_content = '<label for="' . $dropdown_id . '" class="wp-block-archives__label' . $show_label . '">' . esc_html( $title ) . '</label>
<select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value="">' . esc_html( $label ) . '</option>' . $archives . '</select>';
return sprintf(
'<div %1$s>%2$s</div>',

View File

@ -11,6 +11,10 @@
"type": "boolean",
"default": false
},
"showLabel": {
"type": "boolean",
"default": true
},
"showPostCounts": {
"type": "boolean",
"default": false
@ -22,7 +26,24 @@
},
"supports": {
"align": true,
"html": false
"html": false,
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"editorStyle": "wp-block-archives-editor"
}

View File

@ -12,15 +12,18 @@
"type": "string",
"source": "attribute",
"selector": "audio",
"attribute": "src"
"attribute": "src",
"__experimentalRole": "content"
},
"caption": {
"type": "string",
"source": "html",
"selector": "figcaption"
"selector": "figcaption",
"__experimentalRole": "content"
},
"id": {
"type": "number"
"type": "number",
"__experimentalRole": "content"
},
"autoplay": {
"type": "boolean",
@ -43,7 +46,11 @@
},
"supports": {
"anchor": true,
"align": true
"align": true,
"spacing": {
"margin": true,
"padding": true
}
},
"editorStyle": "wp-block-audio-editor",
"style": "wp-block-audio"

View File

@ -75,7 +75,7 @@
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-audio {
margin: 0 0 1em 0;
box-sizing: border-box;
}
.wp-block-audio figcaption {
margin-top: 0.5em;

View File

@ -1 +1 @@
.wp-block-audio{margin:0 0 1em}.wp-block-audio figcaption{margin-top:.5em;margin-bottom:1em}.wp-block-audio audio{width:100%;min-width:300px}
.wp-block-audio{box-sizing:border-box}.wp-block-audio figcaption{margin-top:.5em;margin-bottom:1em}.wp-block-audio audio{width:100%;min-width:300px}

View File

@ -75,7 +75,7 @@
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-audio {
margin: 0 0 1em 0;
box-sizing: border-box;
}
.wp-block-audio figcaption {
margin-top: 0.5em;

View File

@ -1 +1 @@
.wp-block-audio{margin:0 0 1em}.wp-block-audio figcaption{margin-top:.5em;margin-bottom:1em}.wp-block-audio audio{width:100%;min-width:300px}
.wp-block-audio{box-sizing:border-box}.wp-block-audio figcaption{margin-top:.5em;margin-bottom:1em}.wp-block-audio audio{width:100%;min-width:300px}

View File

@ -81,4 +81,8 @@
}
.is-dark-theme .wp-block-audio figcaption {
color: rgba(255, 255, 255, 0.65);
}
.wp-block-audio {
margin: 0 0 1em 0;
}

View File

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

View File

@ -81,4 +81,8 @@
}
.is-dark-theme .wp-block-audio figcaption {
color: rgba(255, 255, 255, 0.65);
}
.wp-block-audio {
margin: 0 0 1em 0;
}

View File

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

View File

@ -105,11 +105,11 @@ function render_block_core_avatar( $attributes, $content, $block ) {
return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
}
$comment = get_comment( $block->context['commentId'] );
/* translators: %s is the Comment Author name */
$alt = sprintf( __( '%s Avatar' ), $comment->comment_author );
if ( ! $comment ) {
return '';
}
/* translators: %s is the Comment Author name */
$alt = sprintf( __( '%s Avatar' ), $comment->comment_author );
$avatar_block = get_avatar(
$comment,
$size,

View File

@ -22,7 +22,6 @@
"type": "string",
"default": "_self"
}
},
"usesContext": [ "postType", "postId", "commentId" ],
"supports": {
@ -30,7 +29,8 @@
"align": true,
"alignWide": false,
"spacing": {
"margin": true
"margin": true,
"padding": true
},
"__experimentalBorder": {
"__experimentalSkipSerialization": true,

View File

@ -74,6 +74,9 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-avatar {
box-sizing: border-box;
}
.wp-block-avatar.aligncenter {
text-align: center;
}

View File

@ -1 +1 @@
.wp-block-avatar.aligncenter{text-align:center}
.wp-block-avatar{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center}

View File

@ -74,6 +74,9 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-avatar {
box-sizing: border-box;
}
.wp-block-avatar.aligncenter {
text-align: center;
}

View File

@ -1 +1 @@
.wp-block-avatar.aligncenter{text-align:center}
.wp-block-avatar{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center}

View File

@ -68,7 +68,13 @@
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
@ -88,7 +94,7 @@
"radius": true
}
},
"__experimentalSelector": ".wp-block-button__link"
"__experimentalSelector": ".wp-block-button .wp-block-button__link"
},
"styles": [
{ "name": "fill", "label": "Fill", "isDefault": true },

View File

@ -136,4 +136,8 @@
div[data-type="core/button"] {
display: table;
}
.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link {
text-decoration: inherit;
}

View File

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

View File

@ -137,4 +137,8 @@
div[data-type="core/button"] {
display: table;
}
.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link {
text-decoration: inherit;
}

View File

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

View File

@ -75,22 +75,12 @@
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-button__link {
color: #fff;
background-color: #32373c;
border-radius: 9999px;
box-shadow: none;
cursor: pointer;
display: inline-block;
font-size: 1.125em;
padding: calc(0.667em + 2px) calc(1.333em + 2px);
text-align: center;
text-decoration: none;
word-break: break-word;
box-sizing: border-box;
}
.wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, .wp-block-button__link:visited {
color: #fff;
}
.wp-block-button__link.aligncenter {
text-align: center;
}
@ -98,6 +88,17 @@
text-align: right;
}
:where(.wp-block-button__link) {
box-shadow: none;
text-decoration: none;
border-radius: 9999px;
padding: calc(0.667em + 2px) calc(1.333em + 2px);
}
.wp-block-button[style*=text-decoration] .wp-block-button__link {
text-decoration: inherit;
}
.wp-block-buttons > .wp-block-button.has-custom-width {
max-width: none;
}
@ -141,18 +142,18 @@
border-radius: 0 !important;
}
.is-style-outline > :where(.wp-block-button__link),
:where(.wp-block-button__link).is-style-outline {
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline {
border: 2px solid currentColor;
padding: 0.667em 1.333em;
}
.is-style-outline > .wp-block-button__link:not(.has-text-color),
.wp-block-button__link.is-style-outline:not(.has-text-color) {
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color),
.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color) {
color: currentColor;
}
.is-style-outline > .wp-block-button__link:not(.has-background),
.wp-block-button__link.is-style-outline:not(.has-background) {
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background),
.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background) {
background-color: transparent;
}

View File

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

View File

@ -75,22 +75,12 @@
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-button__link {
color: #fff;
background-color: #32373c;
border-radius: 9999px;
box-shadow: none;
cursor: pointer;
display: inline-block;
font-size: 1.125em;
padding: calc(0.667em + 2px) calc(1.333em + 2px);
text-align: center;
text-decoration: none;
word-break: break-word;
box-sizing: border-box;
}
.wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, .wp-block-button__link:visited {
color: #fff;
}
.wp-block-button__link.aligncenter {
text-align: center;
}
@ -99,6 +89,17 @@
text-align: right;
}
:where(.wp-block-button__link) {
box-shadow: none;
text-decoration: none;
border-radius: 9999px;
padding: calc(0.667em + 2px) calc(1.333em + 2px);
}
.wp-block-button[style*=text-decoration] .wp-block-button__link {
text-decoration: inherit;
}
.wp-block-buttons > .wp-block-button.has-custom-width {
max-width: none;
}
@ -142,18 +143,18 @@
border-radius: 0 !important;
}
.is-style-outline > :where(.wp-block-button__link),
:where(.wp-block-button__link).is-style-outline {
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline {
border: 2px solid currentColor;
padding: 0.667em 1.333em;
}
.is-style-outline > .wp-block-button__link:not(.has-text-color),
.wp-block-button__link.is-style-outline:not(.has-text-color) {
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color),
.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color) {
color: currentColor;
}
.is-style-outline > .wp-block-button__link:not(.has-background),
.wp-block-button__link.is-style-outline:not(.has-background) {
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background),
.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background) {
background-color: transparent;
}

View File

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

View File

@ -18,6 +18,19 @@
"blockGap": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalLayout": {
"allowSwitching": false,
"allowInheriting": false,

View File

@ -109,6 +109,9 @@
.is-content-justification-center) .wp-block[data-align=center] .wp-block-button {
margin-bottom: 0;
}
.editor-styles-wrapper .wp-block-buttons.has-custom-font-size .wp-block-button__link {
font-size: inherit;
}
.wp-block[data-align=center] > .wp-block-buttons {
align-items: center;

View File

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

View File

@ -109,6 +109,9 @@
.is-content-justification-center) .wp-block[data-align=center] .wp-block-button {
margin-bottom: 0;
}
.editor-styles-wrapper .wp-block-buttons.has-custom-font-size .wp-block-button__link {
font-size: inherit;
}
.wp-block[data-align=center] > .wp-block-buttons {
align-items: center;

View File

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

View File

@ -120,6 +120,13 @@
margin-left: auto;
width: 100%;
}
.wp-block-buttons[style*=text-decoration] .wp-block-button,
.wp-block-buttons[style*=text-decoration] .wp-block-button__link {
text-decoration: inherit;
}
.wp-block-buttons.has-custom-font-size .wp-block-button__link {
font-size: inherit;
}
.wp-block-button.aligncenter {
text-align: center;

View File

@ -1 +1 @@
.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-right:auto;margin-left:auto;width:100%}.wp-block-button.aligncenter{text-align:center}
.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-right:auto;margin-left:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-button.aligncenter{text-align:center}

View File

@ -120,6 +120,13 @@
margin-right: auto;
width: 100%;
}
.wp-block-buttons[style*=text-decoration] .wp-block-button,
.wp-block-buttons[style*=text-decoration] .wp-block-button__link {
text-decoration: inherit;
}
.wp-block-buttons.has-custom-font-size .wp-block-button__link {
font-size: inherit;
}
.wp-block-button.aligncenter {
text-align: center;

View File

@ -1 +1 @@
.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-button.aligncenter{text-align:center}
.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-button.aligncenter{text-align:center}

View File

@ -30,8 +30,8 @@ function render_block_core_calendar( $attributes ) {
if ( isset( $attributes['month'] ) && isset( $attributes['year'] ) ) {
$permalink_structure = get_option( 'permalink_structure' );
if (
strpos( $permalink_structure, '%monthnum%' ) !== false &&
strpos( $permalink_structure, '%year%' ) !== false
str_contains( $permalink_structure, '%monthnum%' ) &&
str_contains( $permalink_structure, '%year%' )
) {
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$monthnum = $attributes['month'];

View File

@ -16,7 +16,19 @@
}
},
"supports": {
"align": true
"align": true,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"style": "wp-block-calendar"
}

View File

@ -22,6 +22,7 @@ function render_block_core_categories( $attributes ) {
'orderby' => 'name',
'show_count' => ! empty( $attributes['showPostCounts'] ),
'title_li' => '',
'hide_empty' => empty( $attributes['showEmpty'] ),
);
if ( ! empty( $attributes['showOnlyTopLevel'] ) && $attributes['showOnlyTopLevel'] ) {
$args['parent'] = 0;
@ -75,7 +76,7 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
location.href = "<?php echo home_url(); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
location.href = "<?php echo esc_url( home_url() ); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
}
}
dropdown.onchange = onCatChange;

View File

@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "core/categories",
"title": "Categories",
"title": "Categories List",
"category": "widgets",
"description": "Display a list of all categories.",
"textdomain": "default",
@ -22,11 +22,32 @@
"showOnlyTopLevel": {
"type": "boolean",
"default": false
},
"showEmpty": {
"type": "boolean",
"default": false
}
},
"supports": {
"align": true,
"html": false
"html": false,
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"editorStyle": "wp-block-categories-editor",
"style": "wp-block-categories"

View File

@ -74,6 +74,9 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-categories {
box-sizing: border-box;
}
.wp-block-categories.alignleft {
margin-right: 2em;
}

View File

@ -1 +1 @@
.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}
.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}

View File

@ -74,6 +74,9 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-categories {
box-sizing: border-box;
}
.wp-block-categories.alignleft {
/*rtl:ignore*/
margin-right: 2em;

View File

@ -1 +1 @@
.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}
.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}

View File

@ -18,10 +18,12 @@
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontStyle": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}

View File

@ -74,6 +74,6 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-post-comments__placeholder * {
pointer-events: none;
.wp-block-code code {
background: none;
}

View File

@ -0,0 +1 @@
.wp-block-code code{background:none}

View File

@ -74,6 +74,6 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-post-comments__placeholder * {
pointer-events: none;
.wp-block-code code {
background: none;
}

View File

@ -0,0 +1 @@
.wp-block-code code{background:none}

View File

@ -19,7 +19,7 @@
},
"templateLock": {
"type": [ "string", "boolean" ],
"enum": [ "all", "insert", false ]
"enum": [ "all", "insert", "contentOnly", false ]
}
},
"supports": {
@ -41,6 +41,29 @@
"padding": true
}
},
"__experimentalBorder": {
"color": true,
"style": true,
"width": true,
"__experimentalDefaultControls": {
"color": true,
"style": true,
"width": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalLayout": true
}
}

View File

@ -29,7 +29,8 @@
},
"spacing": {
"blockGap": {
"__experimentalDefault": "2em"
"__experimentalDefault": "2em",
"sides": [ "horizontal", "vertical" ]
},
"margin": [ "top", "bottom" ],
"padding": true,
@ -57,6 +58,19 @@
"style": true,
"width": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"editorStyle": "wp-block-columns-editor",

View File

@ -43,7 +43,11 @@
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalLetterSpacing": true
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
}
}

View File

@ -29,7 +29,11 @@
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalLetterSpacing": true
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"spacing": {
"padding": [ "horizontal", "vertical" ],

View File

@ -28,6 +28,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
@ -35,6 +39,7 @@
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true

View File

@ -28,6 +28,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
@ -35,7 +39,11 @@
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalLetterSpacing": true
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
}
}

View File

@ -23,6 +23,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
@ -30,7 +34,11 @@
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalLetterSpacing": true
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"html": false
}

View File

@ -4,14 +4,27 @@
"name": "core/comment-template",
"title": "Comment Template",
"category": "design",
"parent": [ "core/comments-query-loop" ],
"parent": [ "core/comments" ],
"description": "Contains the block elements used to display a comment, like the title, date, author, avatar and more.",
"textdomain": "default",
"usesContext": [ "postId" ],
"supports": {
"reusable": false,
"html": false,
"align": true
"align": true,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"style": "wp-block-comment-template"
}

View File

@ -88,4 +88,16 @@
max-width: 100%;
list-style: none;
padding-right: 2rem;
}
.wp-block-comment-template.alignleft {
float: right;
}
.wp-block-comment-template.aligncenter {
margin-right: auto;
margin-left: auto;
width: -moz-fit-content;
width: fit-content;
}
.wp-block-comment-template.alignright {
float: left;
}

View File

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

View File

@ -88,4 +88,16 @@
max-width: 100%;
list-style: none;
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

@ -1 +1 @@
.wp-block-comment-template{margin-bottom:0;max-width:100%;list-style:none;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{margin-bottom:0;max-width:100%;list-style:none;padding-left:2rem}
.wp-block-comment-template{margin-bottom:0;max-width:100%;list-style:none;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{margin-bottom:0;max-width:100%;list-style:none;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

@ -26,10 +26,12 @@
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontStyle": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}

View File

@ -10,6 +10,19 @@
"usesContext": [ "postId" ],
"supports": {
"reusable": false,
"html": false
"html": false,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
}
}

View File

@ -26,10 +26,12 @@
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontStyle": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}

View File

@ -4,7 +4,7 @@
"name": "core/comments-pagination",
"title": "Comments Pagination",
"category": "theme",
"parent": [ "core/comments-query-loop" ],
"parent": [ "core/comments" ],
"description": "Displays a paginated navigation to next/previous set of comments, when applicable.",
"textdomain": "default",
"attributes": {
@ -35,6 +35,19 @@
"default": {
"type": "flex"
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"editorStyle": "wp-block-comments-pagination-editor",

View File

@ -1,29 +0,0 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "core/comments-query-loop",
"title": "Comments Query Loop",
"category": "theme",
"description": "An advanced block that allows displaying post comments using different visual configurations.",
"textdomain": "default",
"attributes": {
"tagName": {
"type": "string",
"default": "div"
}
},
"supports": {
"align": [ "wide", "full" ],
"html": false,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
}
},
"editorStyle": "wp-block-comments-editor"
}

View File

@ -1 +0,0 @@
.block-library-comments-toolbar__popover .components-popover__content{min-width:230px}

View File

@ -1 +0,0 @@
.block-library-comments-toolbar__popover .components-popover__content{min-width:230px}

View File

@ -56,7 +56,7 @@ function render_block_core_comments_title( $attributes ) {
} else {
$comments_title = sprintf(
/* translators: %s: Number of comments. */
_n( '%s responses', '%s responses', $comments_count ),
_n( '%s response', '%s responses', $comments_count ),
number_format_i18n( $comments_count )
);
}

View File

@ -4,7 +4,7 @@
"name": "core/comments-title",
"title": "Comments Title",
"category": "theme",
"ancestor": [ "core/comments-query-loop" ],
"ancestor": [ "core/comments" ],
"description": "Displays a title with the number of comments",
"textdomain": "default",
"usesContext": [ "postId", "postType" ],
@ -49,10 +49,12 @@
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontStyle": true,
"__experimentalFontWeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true,
"__experimentalFontFamily": true,

View File

@ -0,0 +1,220 @@
<?php
/**
* Server-side rendering of the `core/comments` block.
*
* @package WordPress
*/
/**
* Renders the `core/comments` block on the server.
*
* This render callback is mainly for rendering a dynamic, legacy version of
* this block (the old `core/post-comments`). It uses the `comments_template()`
* function to generate the output, in the same way as classic PHP themes.
*
* As this callback will always run during SSR, first we need to check whether
* the block is in legacy mode. If not, the HTML generated in the editor is
* returned instead.
*
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
* @return string Returns the filtered post comments for the current post wrapped inside "p" tags.
*/
function render_block_core_comments( $attributes, $content, $block ) {
global $post;
$post_id = $block->context['postId'];
if ( ! isset( $post_id ) ) {
return '';
}
$comment_args = array(
'post_id' => $post_id,
'count' => true,
'status' => 'approve',
);
// Return early if there are no comments and comments are closed.
if ( ! comments_open( $post_id ) && get_comments( $comment_args ) === 0 ) {
return '';
}
// If this isn't the legacy block, we need to render the static version of this block.
$is_legacy = 'core/post-comments' === $block->name || ! empty( $attributes['legacy'] );
if ( ! $is_legacy ) {
return $block->render( array( 'dynamic' => false ) );
}
$post_before = $post;
$post = get_post( $post_id );
setup_postdata( $post );
ob_start();
/*
* There's a deprecation warning generated by WP Core.
* Ideally this deprecation is removed from Core.
* In the meantime, this removes it from the output.
*/
add_filter( 'deprecated_file_trigger_error', '__return_false' );
comments_template();
remove_filter( 'deprecated_file_trigger_error', '__return_false' );
$output = ob_get_clean();
$post = $post_before;
$classnames = array();
// Adds the old class name for styles' backwards compatibility.
if ( isset( $attributes['legacy'] ) ) {
$classnames[] = 'wp-block-post-comments';
}
if ( isset( $attributes['textAlign'] ) ) {
$classnames[] = 'has-text-align-' . $attributes['textAlign'];
}
$wrapper_attributes = get_block_wrapper_attributes(
array( 'class' => implode( ' ', $classnames ) )
);
/*
* Enqueues scripts and styles required only for the legacy version. That is
* why they are not defined in `block.json`.
*/
wp_enqueue_script( 'comment-reply' );
enqueue_legacy_post_comments_block_styles( $block->name );
return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes, $output );
}
/**
* Registers the `core/comments` block on the server.
*/
function register_block_core_comments() {
register_block_type_from_metadata(
__DIR__ . '/comments',
array(
'render_callback' => 'render_block_core_comments',
'skip_inner_blocks' => true,
)
);
}
add_action( 'init', 'register_block_core_comments' );
/**
* Use the button block classes for the form-submit button.
*
* @param array $fields The default comment form arguments.
*
* @return array Returns the modified fields.
*/
function comments_block_form_defaults( $fields ) {
if ( wp_is_block_theme() ) {
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link ' . wp_theme_get_element_class_name( 'button' ) . '" value="%4$s" />';
$fields['submit_field'] = '<p class="form-submit wp-block-button">%1$s %2$s</p>';
}
return $fields;
}
add_filter( 'comment_form_defaults', 'comments_block_form_defaults' );
/**
* Enqueues styles from the legacy `core/post-comments` block. These styles are
* required only by the block's fallback.
*
* @param string $block_name Name of the new block type.
*/
function enqueue_legacy_post_comments_block_styles( $block_name ) {
static $are_styles_enqueued = false;
if ( ! $are_styles_enqueued ) {
$handles = array(
'wp-block-post-comments',
'wp-block-buttons',
'wp-block-button',
);
foreach ( $handles as $handle ) {
wp_enqueue_block_style( $block_name, array( 'handle' => $handle ) );
}
$are_styles_enqueued = true;
}
}
/**
* Ensures backwards compatibility for any users running the Gutenberg plugin
* who have used Post Comments before it was merged into Comments Query Loop.
*
* The same approach was followed when core/query-loop was renamed to
* core/post-template.
*
* @see https://github.com/WordPress/gutenberg/pull/41807
* @see https://github.com/WordPress/gutenberg/pull/32514
*/
function register_legacy_post_comments_block() {
$registry = WP_Block_Type_Registry::get_instance();
/*
* Remove the old `post-comments` block if it was already registered, as it
* is about to be replaced by the type defined below.
*/
if ( $registry->is_registered( 'core/post-comments' ) ) {
unregister_block_type( 'core/post-comments' );
}
// Recreate the legacy block metadata.
$metadata = array(
'name' => 'core/post-comments',
'category' => 'theme',
'attributes' => array(
'textAlign' => array(
'type' => 'string',
),
),
'uses_context' => array(
'postId',
'postType',
),
'supports' => array(
'html' => false,
'align' => array( 'wide', 'full' ),
'typography' => array(
'fontSize' => true,
'lineHeight' => true,
'__experimentalFontStyle' => true,
'__experimentalFontWeight' => true,
'__experimentalLetterSpacing' => true,
'__experimentalTextTransform' => true,
'__experimentalDefaultControls' => array(
'fontSize' => true,
),
),
'color' => array(
'gradients' => true,
'link' => true,
'__experimentalDefaultControls' => array(
'background' => true,
'text' => true,
),
),
'inserter' => false,
),
'style' => array(
'wp-block-post-comments',
'wp-block-buttons',
'wp-block-button',
),
'editorStyle' => 'wp-block-post-comments-editor',
'render_callback' => 'render_block_core_comments',
'skip_inner_blocks' => true,
);
/*
* Filters the metadata object, the same way it's done inside
* `register_block_type_from_metadata()`. This applies some default filters,
* like `_wp_multiple_block_styles`, which is required in this case because
* the block has multiple styles.
*/
$metadata = apply_filters( 'block_type_metadata', $metadata );
register_block_type( 'core/post-comments', $metadata );
}
add_action( 'init', 'register_legacy_post_comments_block', 21 );

View File

@ -0,0 +1,47 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "core/comments",
"title": "Comments",
"category": "theme",
"description": "An advanced block that allows displaying post comments using different visual configurations.",
"textdomain": "default",
"attributes": {
"tagName": {
"type": "string",
"default": "div"
},
"legacy": {
"type": "boolean",
"default": false
}
},
"supports": {
"align": [ "wide", "full" ],
"html": false,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"editorStyle": "wp-block-comments-editor",
"usesContext": [ "postId", "postType" ]
}

View File

@ -0,0 +1,201 @@
/**
* Colors
*/
/**
* Breakpoints & Media Queries
*/
/**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Dimensions.
*/
/**
* Shadows.
*/
/**
* Editor widths.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Breakpoint mixins
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
/* Styles for backwards compatibility with the legacy `post-comments` block */
.wp-block-post-comments, .wp-block-comments__legacy-placeholder {
/* utility classes */
/* end utility classes */
}
.wp-block-post-comments .alignleft, .wp-block-comments__legacy-placeholder .alignleft {
float: right;
}
.wp-block-post-comments .alignright, .wp-block-comments__legacy-placeholder .alignright {
float: left;
}
.wp-block-post-comments .navigation::after, .wp-block-comments__legacy-placeholder .navigation::after {
content: "";
display: table;
clear: both;
}
.wp-block-post-comments .commentlist, .wp-block-comments__legacy-placeholder .commentlist {
clear: both;
list-style: none;
margin: 0;
padding: 0;
}
.wp-block-post-comments .commentlist .comment, .wp-block-comments__legacy-placeholder .commentlist .comment {
min-height: 2.25em;
padding-right: 3.25em;
}
.wp-block-post-comments .commentlist .comment p, .wp-block-comments__legacy-placeholder .commentlist .comment p {
font-size: 1em;
line-height: 1.8;
margin: 1em 0;
}
.wp-block-post-comments .commentlist .children, .wp-block-comments__legacy-placeholder .commentlist .children {
list-style: none;
margin: 0;
padding: 0;
}
.wp-block-post-comments .comment-author, .wp-block-comments__legacy-placeholder .comment-author {
line-height: 1.5;
}
.wp-block-post-comments .comment-author .avatar, .wp-block-comments__legacy-placeholder .comment-author .avatar {
border-radius: 1.5em;
display: block;
float: right;
height: 2.5em;
margin-top: 0.5em;
margin-left: 0.75em;
width: 2.5em;
}
.wp-block-post-comments .comment-author cite, .wp-block-comments__legacy-placeholder .comment-author cite {
font-style: normal;
}
.wp-block-post-comments .comment-meta, .wp-block-comments__legacy-placeholder .comment-meta {
font-size: 0.875em;
line-height: 1.5;
}
.wp-block-post-comments .comment-meta b, .wp-block-comments__legacy-placeholder .comment-meta b {
font-weight: normal;
}
.wp-block-post-comments .comment-meta .comment-awaiting-moderation, .wp-block-comments__legacy-placeholder .comment-meta .comment-awaiting-moderation {
margin-top: 1em;
margin-bottom: 1em;
display: block;
}
.wp-block-post-comments .comment-body .commentmetadata, .wp-block-comments__legacy-placeholder .comment-body .commentmetadata {
font-size: 0.875em;
}
.wp-block-post-comments .comment-form-comment label, .wp-block-comments__legacy-placeholder .comment-form-comment label,
.wp-block-post-comments .comment-form-author label,
.wp-block-comments__legacy-placeholder .comment-form-author label,
.wp-block-post-comments .comment-form-email label,
.wp-block-comments__legacy-placeholder .comment-form-email label,
.wp-block-post-comments .comment-form-url label,
.wp-block-comments__legacy-placeholder .comment-form-url label {
display: block;
margin-bottom: 0.25em;
}
.wp-block-post-comments .comment-form textarea, .wp-block-comments__legacy-placeholder .comment-form textarea,
.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),
.wp-block-comments__legacy-placeholder .comment-form input:not([type=submit]):not([type=checkbox]) {
display: block;
box-sizing: border-box;
width: 100%;
}
.wp-block-post-comments .comment-form-cookies-consent, .wp-block-comments__legacy-placeholder .comment-form-cookies-consent {
display: flex;
gap: 0.25em;
}
.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent, .wp-block-comments__legacy-placeholder .comment-form-cookies-consent #wp-comment-cookies-consent {
margin-top: 0.35em;
}
.wp-block-post-comments .comment-reply-title, .wp-block-comments__legacy-placeholder .comment-reply-title {
margin-bottom: 0;
}
.wp-block-post-comments .comment-reply-title :where(small), .wp-block-comments__legacy-placeholder .comment-reply-title :where(small) {
font-size: var(--wp--preset--font-size--medium, smaller);
margin-right: 0.5em;
}
.wp-block-post-comments .reply, .wp-block-comments__legacy-placeholder .reply {
font-size: 0.875em;
margin-bottom: 1.4em;
}
.wp-block-post-comments textarea, .wp-block-comments__legacy-placeholder textarea,
.wp-block-post-comments input:not([type=submit]),
.wp-block-comments__legacy-placeholder input:not([type=submit]) {
border: 1px solid #949494;
font-size: 1em;
font-family: inherit;
}
.wp-block-post-comments textarea, .wp-block-comments__legacy-placeholder textarea,
.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),
.wp-block-comments__legacy-placeholder input:not([type=submit]):not([type=checkbox]) {
padding: calc(0.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

@ -0,0 +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{content:"";display:table;clear:both}.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-top:.5em;margin-left:.75em;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{margin-top:1em;margin-bottom:1em;display:block}.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{display:block;box-sizing:border-box;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-size:1em;font-family:inherit}.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

@ -0,0 +1,201 @@
/**
* Colors
*/
/**
* Breakpoints & Media Queries
*/
/**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Dimensions.
*/
/**
* Shadows.
*/
/**
* Editor widths.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Breakpoint mixins
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
/* Styles for backwards compatibility with the legacy `post-comments` block */
.wp-block-post-comments, .wp-block-comments__legacy-placeholder {
/* utility classes */
/* end utility classes */
}
.wp-block-post-comments .alignleft, .wp-block-comments__legacy-placeholder .alignleft {
float: left;
}
.wp-block-post-comments .alignright, .wp-block-comments__legacy-placeholder .alignright {
float: right;
}
.wp-block-post-comments .navigation::after, .wp-block-comments__legacy-placeholder .navigation::after {
content: "";
display: table;
clear: both;
}
.wp-block-post-comments .commentlist, .wp-block-comments__legacy-placeholder .commentlist {
clear: both;
list-style: none;
margin: 0;
padding: 0;
}
.wp-block-post-comments .commentlist .comment, .wp-block-comments__legacy-placeholder .commentlist .comment {
min-height: 2.25em;
padding-left: 3.25em;
}
.wp-block-post-comments .commentlist .comment p, .wp-block-comments__legacy-placeholder .commentlist .comment p {
font-size: 1em;
line-height: 1.8;
margin: 1em 0;
}
.wp-block-post-comments .commentlist .children, .wp-block-comments__legacy-placeholder .commentlist .children {
list-style: none;
margin: 0;
padding: 0;
}
.wp-block-post-comments .comment-author, .wp-block-comments__legacy-placeholder .comment-author {
line-height: 1.5;
}
.wp-block-post-comments .comment-author .avatar, .wp-block-comments__legacy-placeholder .comment-author .avatar {
border-radius: 1.5em;
display: block;
float: left;
height: 2.5em;
margin-top: 0.5em;
margin-right: 0.75em;
width: 2.5em;
}
.wp-block-post-comments .comment-author cite, .wp-block-comments__legacy-placeholder .comment-author cite {
font-style: normal;
}
.wp-block-post-comments .comment-meta, .wp-block-comments__legacy-placeholder .comment-meta {
font-size: 0.875em;
line-height: 1.5;
}
.wp-block-post-comments .comment-meta b, .wp-block-comments__legacy-placeholder .comment-meta b {
font-weight: normal;
}
.wp-block-post-comments .comment-meta .comment-awaiting-moderation, .wp-block-comments__legacy-placeholder .comment-meta .comment-awaiting-moderation {
margin-top: 1em;
margin-bottom: 1em;
display: block;
}
.wp-block-post-comments .comment-body .commentmetadata, .wp-block-comments__legacy-placeholder .comment-body .commentmetadata {
font-size: 0.875em;
}
.wp-block-post-comments .comment-form-comment label, .wp-block-comments__legacy-placeholder .comment-form-comment label,
.wp-block-post-comments .comment-form-author label,
.wp-block-comments__legacy-placeholder .comment-form-author label,
.wp-block-post-comments .comment-form-email label,
.wp-block-comments__legacy-placeholder .comment-form-email label,
.wp-block-post-comments .comment-form-url label,
.wp-block-comments__legacy-placeholder .comment-form-url label {
display: block;
margin-bottom: 0.25em;
}
.wp-block-post-comments .comment-form textarea, .wp-block-comments__legacy-placeholder .comment-form textarea,
.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),
.wp-block-comments__legacy-placeholder .comment-form input:not([type=submit]):not([type=checkbox]) {
display: block;
box-sizing: border-box;
width: 100%;
}
.wp-block-post-comments .comment-form-cookies-consent, .wp-block-comments__legacy-placeholder .comment-form-cookies-consent {
display: flex;
gap: 0.25em;
}
.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent, .wp-block-comments__legacy-placeholder .comment-form-cookies-consent #wp-comment-cookies-consent {
margin-top: 0.35em;
}
.wp-block-post-comments .comment-reply-title, .wp-block-comments__legacy-placeholder .comment-reply-title {
margin-bottom: 0;
}
.wp-block-post-comments .comment-reply-title :where(small), .wp-block-comments__legacy-placeholder .comment-reply-title :where(small) {
font-size: var(--wp--preset--font-size--medium, smaller);
margin-left: 0.5em;
}
.wp-block-post-comments .reply, .wp-block-comments__legacy-placeholder .reply {
font-size: 0.875em;
margin-bottom: 1.4em;
}
.wp-block-post-comments textarea, .wp-block-comments__legacy-placeholder textarea,
.wp-block-post-comments input:not([type=submit]),
.wp-block-comments__legacy-placeholder input:not([type=submit]) {
border: 1px solid #949494;
font-size: 1em;
font-family: inherit;
}
.wp-block-post-comments textarea, .wp-block-comments__legacy-placeholder textarea,
.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),
.wp-block-comments__legacy-placeholder input:not([type=submit]):not([type=checkbox]) {
padding: calc(0.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

@ -0,0 +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{content:"";display:table;clear:both}.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-top:.5em;margin-right:.75em;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{margin-top:1em;margin-bottom:1em;display:block}.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{display:block;box-sizing:border-box;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-size:1em;font-family:inherit}.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

@ -74,6 +74,7 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
/* Styles for backwards compatibility with the legacy `post-comments` block */
.wp-block-post-comments {
/* utility classes */
/* end utility classes */
@ -180,6 +181,7 @@
.wp-block-post-comments input:not([type=submit]):not([type=checkbox]) {
padding: calc(0.667em + 2px);
}
.wp-block-post-comments input[type=submit] {
:where(.wp-block-post-comments input[type="submit"]) {
border: none;
}

View File

@ -1 +1 @@
.wp-block-post-comments .alignleft{float:right}.wp-block-post-comments .alignright{float:left}.wp-block-post-comments .navigation:after{content:"";display:table;clear:both}.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-top:.5em;margin-left:.75em;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{margin-top:1em;margin-bottom:1em;display:block}.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{display:block;box-sizing:border-box;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-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
.wp-block-post-comments .alignleft{float:right}.wp-block-post-comments .alignright{float:left}.wp-block-post-comments .navigation:after{content:"";display:table;clear:both}.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-top:.5em;margin-left:.75em;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{margin-top:1em;margin-bottom:1em;display:block}.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{display:block;box-sizing:border-box;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-size:1em;font-family:inherit}.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,7 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
/* Styles for backwards compatibility with the legacy `post-comments` block */
.wp-block-post-comments {
/* utility classes */
/* end utility classes */
@ -180,6 +181,7 @@
.wp-block-post-comments input:not([type=submit]):not([type=checkbox]) {
padding: calc(0.667em + 2px);
}
.wp-block-post-comments input[type=submit] {
:where(.wp-block-post-comments input[type="submit"]) {
border: none;
}

View File

@ -1 +1 @@
.wp-block-post-comments .alignleft{float:left}.wp-block-post-comments .alignright{float:right}.wp-block-post-comments .navigation:after{content:"";display:table;clear:both}.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-top:.5em;margin-right:.75em;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{margin-top:1em;margin-bottom:1em;display:block}.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{display:block;box-sizing:border-box;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-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
.wp-block-post-comments .alignleft{float:left}.wp-block-post-comments .alignright{float:right}.wp-block-post-comments .navigation:after{content:"";display:table;clear:both}.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-top:.5em;margin-right:.75em;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{margin-top:1em;margin-bottom:1em;display:block}.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{display:block;box-sizing:border-box;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-size:1em;font-family:inherit}.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

@ -73,7 +73,7 @@
},
"templateLock": {
"type": [ "string", "boolean" ],
"enum": [ "all", "insert", false ]
"enum": [ "all", "insert", "contentOnly", false ]
}
},
"usesContext": [ "postId", "postType" ],
@ -83,6 +83,7 @@
"html": false,
"spacing": {
"padding": true,
"margin": [ "top", "bottom" ],
"__experimentalDefaultControls": {
"padding": true
}
@ -91,6 +92,19 @@
"__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
"text": false,
"background": false
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"editorStyle": "wp-block-cover-editor",

View File

@ -111,9 +111,6 @@
transform: translate(50%, -50%);
margin: 0;
}
.wp-block-cover .block-editor-block-list__layout {
width: 100%;
}
.wp-block-cover .wp-block-cover__inner-container {
text-align: right;
margin-right: 0;
@ -122,6 +119,13 @@
.wp-block-cover .wp-block-cover__placeholder-background-options {
width: 100%;
}
.wp-block-cover .wp-block-cover__image--placeholder-image {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
[data-align=left] > .wp-block-cover,
[data-align=right] > .wp-block-cover {
@ -152,4 +156,8 @@
.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;
}

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{min-height:240px;justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{min-height:240px;display:block}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{position:absolute;z-index:1;top:50%;right:50%;transform:translate(50%,-50%);margin:0}.wp-block-cover .block-editor-block-list__layout{width:100%}.wp-block-cover .wp-block-cover__inner-container{text-align:right;margin-right:0;margin-left:0}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-right:auto}.block-library-cover__resize-container{position:absolute!important;top:0;right:0;left:0;bottom:0;min-height:50px}.block-library-cover__resize-container:not(.is-resizing){height:auto!important}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}
.editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{min-height:auto!important;padding:0!important}.wp-block-cover.is-placeholder .block-library-cover__resize-container{display:none}.wp-block-cover.is-placeholder .components-placeholder.is-large{min-height:240px;justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{min-height:240px;display:block}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{position:absolute;z-index:1;top:50%;right:50%;transform:translate(50%,-50%);margin:0}.wp-block-cover .wp-block-cover__inner-container{text-align:right;margin-right:0;margin-left:0}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{position:absolute;top:0;left:0;bottom:0;right: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{position:absolute!important;top:0;right:0;left:0;bottom:0;min-height:50px}.block-library-cover__resize-container:not(.is-resizing){height:auto!important}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}

View File

@ -111,9 +111,6 @@
transform: translate(-50%, -50%);
margin: 0;
}
.wp-block-cover .block-editor-block-list__layout {
width: 100%;
}
.wp-block-cover .wp-block-cover__inner-container {
text-align: left;
margin-left: 0;
@ -122,6 +119,13 @@
.wp-block-cover .wp-block-cover__placeholder-background-options {
width: 100%;
}
.wp-block-cover .wp-block-cover__image--placeholder-image {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
[data-align=left] > .wp-block-cover,
[data-align=right] > .wp-block-cover {
@ -152,4 +156,8 @@
.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;
}

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{min-height:240px;justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{min-height:240px;display:block}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}.wp-block-cover .block-editor-block-list__layout{width:100%}.wp-block-cover .wp-block-cover__inner-container{text-align:left;margin-left:0;margin-right:0}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-left:auto}.block-library-cover__resize-container{position:absolute!important;top:0;left:0;right:0;bottom:0;min-height:50px}.block-library-cover__resize-container:not(.is-resizing){height:auto!important}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}
.editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{min-height:auto!important;padding:0!important}.wp-block-cover.is-placeholder .block-library-cover__resize-container{display:none}.wp-block-cover.is-placeholder .components-placeholder.is-large{min-height:240px;justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder .components-placeholder.is-large+.block-library-cover__resize-container{min-height:240px;display:block}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}.wp-block-cover .wp-block-cover__inner-container{text-align:left;margin-left:0;margin-right:0}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{position:absolute;top:0;right:0;bottom:0;left: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{position:absolute!important;top:0;left:0;right:0;bottom:0;min-height:50px}.block-library-cover__resize-container:not(.is-resizing){height:auto!important}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}

View File

@ -77,15 +77,13 @@
.wp-block-cover-image,
.wp-block-cover {
position: relative;
background-size: cover;
background-position: center center;
min-height: 430px;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 1em;
box-sizing: border-box;
box-sizing: border-box; direction: ltr;
/**
* Set a default background color for has-background-dim _unless_ it includes another
* background-color class (e.g. has-green-background-color). The presence of another
@ -97,27 +95,6 @@
* - Issue with alternative fix: https://github.com/WordPress/gutenberg/issues/26545
*/
}
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax {
background-attachment: fixed;
}
@supports (-webkit-touch-callout: inherit) {
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax {
background-attachment: scroll;
}
}
@media (prefers-reduced-motion: reduce) {
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax {
background-attachment: scroll;
}
}
.wp-block-cover-image.is-repeated,
.wp-block-cover.is-repeated {
background-repeat: repeat;
background-size: auto;
}
.wp-block-cover-image.has-background-dim:not([class*=-background-color]),
.wp-block-cover-image .has-background-dim:not([class*=-background-color]),
.wp-block-cover.has-background-dim:not([class*=-background-color]),
@ -293,10 +270,6 @@
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100 {
opacity: 1;
}
.wp-block-cover-image .block-library-cover__padding-visualizer,
.wp-block-cover .block-library-cover__padding-visualizer {
z-index: 2;
}
.wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
.wp-block-cover.alignleft,
.wp-block-cover.alignright {
@ -326,7 +299,7 @@
.wp-block-cover .wp-block-cover__inner-container {
width: 100%;
z-index: 1;
color: #fff;
color: #fff; direction: rtl;
}
.wp-block-cover-image.is-light .wp-block-cover__inner-container,
.wp-block-cover.is-light .wp-block-cover__inner-container {
@ -398,9 +371,9 @@
margin: 0;
width: auto;
}
.wp-block-cover-image img.wp-block-cover__image-background,
.wp-block-cover-image .wp-block-cover__image-background,
.wp-block-cover-image video.wp-block-cover__video-background,
.wp-block-cover img.wp-block-cover__image-background,
.wp-block-cover .wp-block-cover__image-background,
.wp-block-cover video.wp-block-cover__video-background {
position: absolute;
top: 0;
@ -413,13 +386,44 @@
height: 100%;
max-width: none;
max-height: none;
-o-object-fit: cover;
object-fit: cover;
object-fit: cover;
outline: none;
border: none;
box-shadow: none;
}
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax,
.wp-block-cover__image-background.has-parallax,
video.wp-block-cover__video-background.has-parallax {
background-attachment: fixed;
background-size: cover;
background-repeat: no-repeat;
}
@supports (-webkit-overflow-scrolling: touch) {
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax,
.wp-block-cover__image-background.has-parallax,
video.wp-block-cover__video-background.has-parallax {
background-attachment: scroll;
}
}
@media (prefers-reduced-motion: reduce) {
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax,
.wp-block-cover__image-background.has-parallax,
video.wp-block-cover__video-background.has-parallax {
background-attachment: scroll;
}
}
.wp-block-cover-image.is-repeated,
.wp-block-cover.is-repeated,
.wp-block-cover__image-background.is-repeated,
video.wp-block-cover__video-background.is-repeated {
background-repeat: repeat;
background-size: auto;
}
.wp-block-cover__video-background {
z-index: 0;
}

File diff suppressed because one or more lines are too long

View File

@ -77,15 +77,14 @@
.wp-block-cover-image,
.wp-block-cover {
position: relative;
background-size: cover;
background-position: center center;
min-height: 430px;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 1em;
box-sizing: border-box;
/*rtl:raw: direction: ltr; */
/**
* Set a default background color for has-background-dim _unless_ it includes another
* background-color class (e.g. has-green-background-color). The presence of another
@ -97,27 +96,6 @@
* - Issue with alternative fix: https://github.com/WordPress/gutenberg/issues/26545
*/
}
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax {
background-attachment: fixed;
}
@supports (-webkit-touch-callout: inherit) {
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax {
background-attachment: scroll;
}
}
@media (prefers-reduced-motion: reduce) {
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax {
background-attachment: scroll;
}
}
.wp-block-cover-image.is-repeated,
.wp-block-cover.is-repeated {
background-repeat: repeat;
background-size: auto;
}
.wp-block-cover-image.has-background-dim:not([class*=-background-color]),
.wp-block-cover-image .has-background-dim:not([class*=-background-color]),
.wp-block-cover.has-background-dim:not([class*=-background-color]),
@ -293,10 +271,6 @@
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100 {
opacity: 1;
}
.wp-block-cover-image .block-library-cover__padding-visualizer,
.wp-block-cover .block-library-cover__padding-visualizer {
z-index: 2;
}
.wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
.wp-block-cover.alignleft,
.wp-block-cover.alignright {
@ -327,6 +301,7 @@
width: 100%;
z-index: 1;
color: #fff;
/*rtl:raw: direction: rtl; */
}
.wp-block-cover-image.is-light .wp-block-cover__inner-container,
.wp-block-cover.is-light .wp-block-cover__inner-container {
@ -398,9 +373,9 @@
margin: 0;
width: auto;
}
.wp-block-cover-image img.wp-block-cover__image-background,
.wp-block-cover-image .wp-block-cover__image-background,
.wp-block-cover-image video.wp-block-cover__video-background,
.wp-block-cover img.wp-block-cover__image-background,
.wp-block-cover .wp-block-cover__image-background,
.wp-block-cover video.wp-block-cover__video-background {
position: absolute;
top: 0;
@ -413,13 +388,44 @@
height: 100%;
max-width: none;
max-height: none;
-o-object-fit: cover;
object-fit: cover;
object-fit: cover;
outline: none;
border: none;
box-shadow: none;
}
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax,
.wp-block-cover__image-background.has-parallax,
video.wp-block-cover__video-background.has-parallax {
background-attachment: fixed;
background-size: cover;
background-repeat: no-repeat;
}
@supports (-webkit-overflow-scrolling: touch) {
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax,
.wp-block-cover__image-background.has-parallax,
video.wp-block-cover__video-background.has-parallax {
background-attachment: scroll;
}
}
@media (prefers-reduced-motion: reduce) {
.wp-block-cover-image.has-parallax,
.wp-block-cover.has-parallax,
.wp-block-cover__image-background.has-parallax,
video.wp-block-cover__video-background.has-parallax {
background-attachment: scroll;
}
}
.wp-block-cover-image.is-repeated,
.wp-block-cover.is-repeated,
.wp-block-cover__image-background.is-repeated,
video.wp-block-cover__video-background.is-repeated {
background-repeat: repeat;
background-size: auto;
}
.wp-block-cover__video-background {
z-index: 0;
}

File diff suppressed because one or more lines are too long

View File

@ -94,7 +94,6 @@
}
.wp-block-embed {
margin: 0 0 1em 0;
overflow-wrap: break-word;
}
.wp-block-embed figcaption {

View File

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

View File

@ -94,7 +94,6 @@
}
.wp-block-embed {
margin: 0 0 1em 0;
overflow-wrap: break-word;
}
.wp-block-embed figcaption {

View File

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

View File

@ -81,4 +81,8 @@
}
.is-dark-theme .wp-block-embed figcaption {
color: rgba(255, 255, 255, 0.65);
}
.wp-block-embed {
margin: 0 0 1em 0;
}

View File

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

View File

@ -81,4 +81,8 @@
}
.is-dark-theme .wp-block-embed figcaption {
color: rgba(255, 255, 255, 0.65);
}
.wp-block-embed {
margin: 0 0 1em 0;
}

View File

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

View File

@ -19,6 +19,28 @@ function render_block_core_file( $attributes, $content ) {
wp_enqueue_script( 'wp-block-file-view' );
}
// Update object's aria-label attribute if present in block HTML.
// Match an aria-label attribute from an object tag.
$pattern = '@<object.+(?<attribute>aria-label="(?<filename>[^"]+)?")@i';
$content = preg_replace_callback(
$pattern,
function ( $matches ) {
$filename = ! empty( $matches['filename'] ) ? $matches['filename'] : '';
$has_filename = ! empty( $filename ) && 'PDF embed' !== $filename;
$label = $has_filename ?
sprintf(
/* translators: %s: filename. */
__( 'Embed of %s.' ),
$filename
)
: __( 'PDF embed' );
return str_replace( $matches['attribute'], sprintf( 'aria-label="%s"', $label ), $matches[0] );
},
$content
);
return $content;
}

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