mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Update @wordpress packages for Beta 4
Update packages with these bug fixes from Gutenberg: Navigation: Remove hardcoded typography units Handle parsed request Navigation: Refactor modal padding to be simpler and more flexible Show notice on save in site editor Add aria-pressed true/false to Toggle navigation button based on state Components FontSizePicker: Use incremental sequence of numbers Custom keys from theme.json: fix kebabCase conversion Template Part: Fix 'isMissing' condition check Multi-Entity Saving: Decode HTML entities in item titles Font sizes: update default values Query Loop: Add useBlockPreview, fix Query Loop wide alignment Only add dialog role to navigation when modal is open Fix navigation appender Show a UI warning when user does not have permission to update/edit a Navigation block Block editor: Fix Enter handling for nested blocks Update: Use subtitle styles for the palette names Allow publishing a post while not saving changes to non-post entities Update: Block top level useSetting paths Fix Site Logo block alignment issues Editor: when Toggle navigation receives state false, focus ToolsPanel: Allow items to register when panelId is null Block Support Panels - Make block support tools panels compatible Gallery: Fix block registration hook priority Navigation: Fix page list issues in overlay Ensure the overlay menu works when inserting navigation block pattern Restrict Navigation permissions and show UI warning if cannot create Add block gap support for group blocks Try cascading nav styles through classnames Fix: Impossible to edit theme and default colors Fix: Color editor discards colors with default name Site Editor: Fix template author avatar check Template Editing Mode: Fix options dropdown Avoid undo issues when reset parent blocks for controlled blocks Add comment-form and comment-list to html5 theme support and fix comment layout Props hellofromtonya. See #54487. git-svn-id: https://develop.svn.wordpress.org/trunk@52402 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
57129a6078
commit
16aca51d8b
1942
package-lock.json
generated
1942
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
54
package.json
54
package.json
@ -78,57 +78,57 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@wordpress/a11y": "3.2.4",
|
||||
"@wordpress/annotations": "2.2.7",
|
||||
"@wordpress/annotations": "2.2.8",
|
||||
"@wordpress/api-fetch": "5.2.6",
|
||||
"@wordpress/autop": "3.2.3",
|
||||
"@wordpress/blob": "3.2.2",
|
||||
"@wordpress/block-directory": "3.0.17",
|
||||
"@wordpress/block-editor": "8.0.11",
|
||||
"@wordpress/block-library": "6.0.15",
|
||||
"@wordpress/block-directory": "3.0.19",
|
||||
"@wordpress/block-editor": "8.0.12",
|
||||
"@wordpress/block-library": "6.0.17",
|
||||
"@wordpress/block-serialization-default-parser": "4.2.3",
|
||||
"@wordpress/blocks": "11.1.4",
|
||||
"@wordpress/components": "19.1.5",
|
||||
"@wordpress/compose": "5.0.6",
|
||||
"@wordpress/core-data": "4.0.8",
|
||||
"@wordpress/customize-widgets": "2.0.17",
|
||||
"@wordpress/data": "6.1.4",
|
||||
"@wordpress/data-controls": "2.2.7",
|
||||
"@wordpress/blocks": "11.1.5",
|
||||
"@wordpress/components": "19.1.6",
|
||||
"@wordpress/compose": "5.0.7",
|
||||
"@wordpress/core-data": "4.0.9",
|
||||
"@wordpress/customize-widgets": "2.0.19",
|
||||
"@wordpress/data": "6.1.5",
|
||||
"@wordpress/data-controls": "2.2.8",
|
||||
"@wordpress/date": "4.2.3",
|
||||
"@wordpress/deprecated": "3.2.3",
|
||||
"@wordpress/dom": "3.2.7",
|
||||
"@wordpress/dom-ready": "3.2.3",
|
||||
"@wordpress/edit-post": "5.0.17",
|
||||
"@wordpress/edit-site": "3.0.17",
|
||||
"@wordpress/edit-widgets": "3.1.12",
|
||||
"@wordpress/editor": "12.0.14",
|
||||
"@wordpress/edit-post": "5.0.19",
|
||||
"@wordpress/edit-site": "3.0.19",
|
||||
"@wordpress/edit-widgets": "3.1.14",
|
||||
"@wordpress/editor": "12.0.15",
|
||||
"@wordpress/element": "4.0.4",
|
||||
"@wordpress/escape-html": "2.2.3",
|
||||
"@wordpress/format-library": "3.0.17",
|
||||
"@wordpress/format-library": "3.0.18",
|
||||
"@wordpress/hooks": "3.2.2",
|
||||
"@wordpress/html-entities": "3.2.3",
|
||||
"@wordpress/i18n": "4.2.4",
|
||||
"@wordpress/icons": "6.1.1",
|
||||
"@wordpress/interface": "4.1.13",
|
||||
"@wordpress/interface": "4.1.14",
|
||||
"@wordpress/is-shallow-equal": "4.2.1",
|
||||
"@wordpress/keyboard-shortcuts": "3.0.6",
|
||||
"@wordpress/keyboard-shortcuts": "3.0.7",
|
||||
"@wordpress/keycodes": "3.2.4",
|
||||
"@wordpress/list-reusable-blocks": "3.0.15",
|
||||
"@wordpress/list-reusable-blocks": "3.0.16",
|
||||
"@wordpress/media-utils": "3.0.5",
|
||||
"@wordpress/notices": "3.2.7",
|
||||
"@wordpress/nux": "5.0.15",
|
||||
"@wordpress/plugins": "4.0.6",
|
||||
"@wordpress/notices": "3.2.8",
|
||||
"@wordpress/nux": "5.0.16",
|
||||
"@wordpress/plugins": "4.0.7",
|
||||
"@wordpress/primitives": "3.0.4",
|
||||
"@wordpress/priority-queue": "2.2.3",
|
||||
"@wordpress/redux-routine": "4.2.2",
|
||||
"@wordpress/reusable-blocks": "3.0.17",
|
||||
"@wordpress/rich-text": "5.0.6",
|
||||
"@wordpress/server-side-render": "3.0.15",
|
||||
"@wordpress/reusable-blocks": "3.0.18",
|
||||
"@wordpress/rich-text": "5.0.7",
|
||||
"@wordpress/server-side-render": "3.0.16",
|
||||
"@wordpress/shortcode": "3.2.3",
|
||||
"@wordpress/token-list": "2.2.2",
|
||||
"@wordpress/url": "3.3.1",
|
||||
"@wordpress/viewport": "4.0.6",
|
||||
"@wordpress/viewport": "4.0.7",
|
||||
"@wordpress/warning": "2.2.2",
|
||||
"@wordpress/widgets": "2.0.17",
|
||||
"@wordpress/widgets": "2.0.18",
|
||||
"@wordpress/wordcount": "3.2.3",
|
||||
"backbone": "1.4.0",
|
||||
"clipboard": "2.0.8",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -104,9 +104,6 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
|
||||
$style .= 'align-items: center;';
|
||||
if ( 'horizontal' === $layout_orientation ) {
|
||||
$style .= 'align-items: center;';
|
||||
if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {
|
||||
$style .= '--layout-direction: row;';
|
||||
}
|
||||
/**
|
||||
* Add this style only if is not empty for backwards compatibility,
|
||||
* since we intend to convert blocks that had flex layout implemented
|
||||
@ -114,27 +111,11 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
|
||||
*/
|
||||
if ( ! empty( $layout['justifyContent'] ) && array_key_exists( $layout['justifyContent'], $justify_content_options ) ) {
|
||||
$style .= "justify-content: {$justify_content_options[ $layout['justifyContent'] ]};";
|
||||
if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {
|
||||
// --layout-justification-setting allows children to inherit the value regardless or row or column direction.
|
||||
$style .= "--layout-justification-setting: {$justify_content_options[ $layout['justifyContent'] ]};";
|
||||
$style .= "--layout-wrap: $flex_wrap;";
|
||||
$style .= "--layout-justify: {$justify_content_options[ $layout['justifyContent'] ]};";
|
||||
$style .= '--layout-align: center;';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$style .= 'flex-direction: column;';
|
||||
if ( ! empty( $layout['justifyContent'] ) && array_key_exists( $layout['justifyContent'], $justify_content_options ) ) {
|
||||
$style .= "align-items: {$justify_content_options[ $layout['justifyContent'] ]};";
|
||||
if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {
|
||||
$style .= '--layout-direction: column;';
|
||||
}
|
||||
if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {
|
||||
// --layout-justification-setting allows children to inherit the value regardless or row or column direction.
|
||||
$style .= "--layout-justification-setting: {$justify_content_options[ $layout['justifyContent'] ]};";
|
||||
$style .= '--layout-justify: initial;';
|
||||
$style .= "--layout-align: {$justify_content_options[ $layout['justifyContent'] ]};";
|
||||
}
|
||||
}
|
||||
}
|
||||
$style .= '}';
|
||||
|
||||
@ -48,4 +48,4 @@ function register_block_core_gallery() {
|
||||
);
|
||||
}
|
||||
|
||||
add_action( 'init', 'register_block_core_gallery', 20 );
|
||||
add_action( 'init', 'register_block_core_gallery' );
|
||||
|
||||
@ -26,8 +26,10 @@
|
||||
},
|
||||
"spacing": {
|
||||
"padding": true,
|
||||
"blockGap": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"padding": true
|
||||
"padding": true,
|
||||
"blockGap": true
|
||||
}
|
||||
},
|
||||
"__experimentalBorder": {
|
||||
|
||||
@ -98,7 +98,7 @@ function block_core_navigation_link_build_css_font_sizes( $context ) {
|
||||
$font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] );
|
||||
} elseif ( $has_custom_font_size ) {
|
||||
// Add the custom font size inline style.
|
||||
$font_sizes['inline_styles'] = sprintf( 'font-size: %spx;', $context['style']['typography']['fontSize'] );
|
||||
$font_sizes['inline_styles'] = sprintf( 'font-size: %s;', $context['style']['typography']['fontSize'] );
|
||||
}
|
||||
|
||||
return $font_sizes;
|
||||
|
||||
@ -98,7 +98,7 @@ function block_core_navigation_submenu_build_css_font_sizes( $context ) {
|
||||
$font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] );
|
||||
} elseif ( $has_custom_font_size ) {
|
||||
// Add the custom font size inline style.
|
||||
$font_sizes['inline_styles'] = sprintf( 'font-size: %spx;', $context['style']['typography']['fontSize'] );
|
||||
$font_sizes['inline_styles'] = sprintf( 'font-size: %s;', $context['style']['typography']['fontSize'] );
|
||||
}
|
||||
|
||||
return $font_sizes;
|
||||
|
||||
@ -452,14 +452,24 @@ function render_block_core_navigation( $attributes, $content, $block ) {
|
||||
|
||||
}
|
||||
|
||||
$layout_justification = array(
|
||||
'left' => 'items-justified-left',
|
||||
'right' => 'items-justified-right',
|
||||
'center' => 'items-justified-center',
|
||||
'space-between' => 'items-justified-space-between',
|
||||
);
|
||||
|
||||
// Restore legacy classnames for submenu positioning.
|
||||
$layout_class = '';
|
||||
if ( isset( $attributes['layout']['justifyContent'] ) ) {
|
||||
if ( 'right' === $attributes['layout']['justifyContent'] ) {
|
||||
$layout_class .= 'items-justified-right';
|
||||
} elseif ( 'space-between' === $attributes['layout']['justifyContent'] ) {
|
||||
$layout_class .= 'items-justified-space-between';
|
||||
}
|
||||
$layout_class .= $layout_justification[ $attributes['layout']['justifyContent'] ];
|
||||
}
|
||||
if ( isset( $attributes['layout']['orientation'] ) && 'vertical' === $attributes['layout']['orientation'] ) {
|
||||
$layout_class .= ' is-vertical';
|
||||
}
|
||||
|
||||
if ( isset( $attributes['layout']['flexWrap'] ) && 'nowrap' === $attributes['layout']['flexWrap'] ) {
|
||||
$layout_class .= ' no-wrap';
|
||||
}
|
||||
|
||||
$colors = block_core_navigation_build_css_colors( $attributes );
|
||||
@ -528,10 +538,10 @@ function render_block_core_navigation( $attributes, $content, $block ) {
|
||||
);
|
||||
|
||||
$responsive_container_markup = sprintf(
|
||||
'<button aria-expanded="false" aria-haspopup="true" aria-label="%3$s" class="%6$s" data-micromodal-trigger="modal-%1$s"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><rect x="4" y="7.5" width="16" height="1.5" /><rect x="4" y="15" width="16" height="1.5" /></svg></button>
|
||||
'<button aria-haspopup="true" aria-label="%3$s" class="%6$s" data-micromodal-trigger="modal-%1$s"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><rect x="4" y="7.5" width="16" height="1.5" /><rect x="4" y="15" width="16" height="1.5" /></svg></button>
|
||||
<div class="%5$s" style="%7$s" id="modal-%1$s">
|
||||
<div class="wp-block-navigation__responsive-close" tabindex="-1" data-micromodal-close>
|
||||
<div class="wp-block-navigation__responsive-dialog" role="dialog" aria-modal="true" aria-labelledby="modal-%1$s-title" >
|
||||
<div class="wp-block-navigation__responsive-dialog" aria-label="%8$s">
|
||||
<button aria-label="%4$s" data-micromodal-close class="wp-block-navigation__responsive-container-close"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg></button>
|
||||
<div class="wp-block-navigation__responsive-container-content" id="modal-%1$s-content">
|
||||
%2$s
|
||||
@ -545,7 +555,8 @@ function render_block_core_navigation( $attributes, $content, $block ) {
|
||||
__( 'Close menu' ), // Close button label.
|
||||
implode( ' ', $responsive_container_classes ),
|
||||
implode( ' ', $open_button_classes ),
|
||||
$colors['overlay_inline_styles']
|
||||
$colors['overlay_inline_styles'],
|
||||
__( 'Menu' )
|
||||
);
|
||||
|
||||
return sprintf(
|
||||
|
||||
@ -114,8 +114,7 @@
|
||||
"allowSwitching": false,
|
||||
"allowInheriting": false,
|
||||
"default": {
|
||||
"type": "flex",
|
||||
"setCascadingProperties": true
|
||||
"type": "flex"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '34d9f07c7910e83c264c6c4406619c5e');
|
||||
<?php return array('dependencies' => array(), 'version' => 'aab949d40a5a929e8c972550b42730a8');
|
||||
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'd5ab04a497b4f1465f1f0060b6b71ae3');
|
||||
<?php return array('dependencies' => array(), 'version' => 'fb15026c86328593809ad0e2e073f64f');
|
||||
@ -119,7 +119,7 @@ function block_core_page_list_build_css_font_sizes( $context ) {
|
||||
$font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] );
|
||||
} elseif ( $has_custom_font_size ) {
|
||||
// Add the custom font size inline style.
|
||||
$font_sizes['inline_styles'] = sprintf( 'font-size: %spx;', $context['style']['typography']['fontSize'] );
|
||||
$font_sizes['inline_styles'] = sprintf( 'font-size: %s;', $context['style']['typography']['fontSize'] );
|
||||
}
|
||||
|
||||
return $font_sizes;
|
||||
|
||||
@ -48,10 +48,6 @@ function render_block_core_site_logo( $attributes ) {
|
||||
$classnames[] = $attributes['className'];
|
||||
}
|
||||
|
||||
if ( ! empty( $attributes['align'] ) && in_array( $attributes['align'], array( 'center', 'left', 'right' ), true ) ) {
|
||||
$classnames[] = "align{$attributes['align']}";
|
||||
}
|
||||
|
||||
if ( empty( $attributes['width'] ) ) {
|
||||
$classnames[] = 'is-default-size';
|
||||
}
|
||||
|
||||
@ -6,9 +6,6 @@
|
||||
"description": "Display a graphic to represent this site. Update the block, and the changes apply everywhere it’s used. This is different than the site icon, which is the smaller image visible in your dashboard, browser tabs, etc used to help others recognize this site.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"align": {
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"type": "number"
|
||||
},
|
||||
|
||||
@ -75,24 +75,14 @@
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block[data-align=center] > .wp-block-site-logo {
|
||||
display: table;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wp-block-site-logo a {
|
||||
pointer-events: none;
|
||||
}
|
||||
.wp-block-site-logo:not(.is-default-size) {
|
||||
display: table;
|
||||
}
|
||||
.wp-block-site-logo.is-default-size {
|
||||
width: 120px;
|
||||
}
|
||||
.wp-block-site-logo.is-default-size img {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
.wp-block-site-logo .custom-logo-link {
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
@ -1 +1 @@
|
||||
.wp-block[data-align=center]>.wp-block-site-logo{margin-right:auto;margin-left:auto;text-align:center}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo:not(.is-default-size){display:table}.wp-block-site-logo.is-default-size{width:120px}.wp-block-site-logo.is-default-size img{height:auto;width:100%}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder,.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:120px;width:120px}.wp-block-site-logo.wp-block-site-logo .components-placeholder{justify-content:center;align-items:center;box-shadow:none;padding:0;min-height:48px;min-width:48px;height:100%;width:100%;color:currentColor;background:transparent}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview{position:absolute;top:4px;left:4px;bottom:4px;right:4px;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder:before{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;border:1px dashed;opacity:.4;pointer-events:none;border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset{width:auto}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{color:inherit;padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;visibility:hidden;background:transparent;transition:all .1s linear}@media (prefers-reduced-motion:reduce){.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{transition-duration:0s;transition-delay:0s}}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:#fff}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;stroke:currentColor;stroke-dasharray:3;opacity:.4}.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff;opacity:1;visibility:visible}
|
||||
.wp-block[data-align=center]>.wp-block-site-logo{display:table;margin-right:auto;margin-left:auto}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder,.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:120px;width:120px}.wp-block-site-logo.wp-block-site-logo .components-placeholder{justify-content:center;align-items:center;box-shadow:none;padding:0;min-height:48px;min-width:48px;height:100%;width:100%;color:currentColor;background:transparent}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview{position:absolute;top:4px;left:4px;bottom:4px;right:4px;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder:before{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;border:1px dashed;opacity:.4;pointer-events:none;border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset{width:auto}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{color:inherit;padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;visibility:hidden;background:transparent;transition:all .1s linear}@media (prefers-reduced-motion:reduce){.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{transition-duration:0s;transition-delay:0s}}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:#fff}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;stroke:currentColor;stroke-dasharray:3;opacity:.4}.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff;opacity:1;visibility:visible}
|
||||
@ -75,24 +75,14 @@
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block[data-align=center] > .wp-block-site-logo {
|
||||
display: table;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wp-block-site-logo a {
|
||||
pointer-events: none;
|
||||
}
|
||||
.wp-block-site-logo:not(.is-default-size) {
|
||||
display: table;
|
||||
}
|
||||
.wp-block-site-logo.is-default-size {
|
||||
width: 120px;
|
||||
}
|
||||
.wp-block-site-logo.is-default-size img {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
.wp-block-site-logo .custom-logo-link {
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
@ -1 +1 @@
|
||||
.wp-block[data-align=center]>.wp-block-site-logo{margin-left:auto;margin-right:auto;text-align:center}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo:not(.is-default-size){display:table}.wp-block-site-logo.is-default-size{width:120px}.wp-block-site-logo.is-default-size img{height:auto;width:100%}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder,.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:120px;width:120px}.wp-block-site-logo.wp-block-site-logo .components-placeholder{justify-content:center;align-items:center;box-shadow:none;padding:0;min-height:48px;min-width:48px;height:100%;width:100%;color:currentColor;background:transparent}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview{position:absolute;top:4px;right:4px;bottom:4px;left:4px;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border:1px dashed;opacity:.4;pointer-events:none;border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset{width:auto}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{color:inherit;padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;visibility:hidden;background:transparent;transition:all .1s linear}@media (prefers-reduced-motion:reduce){.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{transition-duration:0s;transition-delay:0s}}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:#fff}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;stroke:currentColor;stroke-dasharray:3;opacity:.4}.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff;opacity:1;visibility:visible}
|
||||
.wp-block[data-align=center]>.wp-block-site-logo{display:table;margin-left:auto;margin-right:auto}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder,.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:120px;width:120px}.wp-block-site-logo.wp-block-site-logo .components-placeholder{justify-content:center;align-items:center;box-shadow:none;padding:0;min-height:48px;min-width:48px;height:100%;width:100%;color:currentColor;background:transparent}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview{position:absolute;top:4px;right:4px;bottom:4px;left:4px;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border:1px dashed;opacity:.4;pointer-events:none;border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset{width:auto}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{color:inherit;padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;visibility:hidden;background:transparent;transition:all .1s linear}@media (prefers-reduced-motion:reduce){.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{transition-duration:0s;transition-delay:0s}}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:#fff}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;stroke:currentColor;stroke-dasharray:3;opacity:.4}.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff;opacity:1;visibility:visible}
|
||||
@ -89,7 +89,9 @@
|
||||
border-radius: inherit;
|
||||
}
|
||||
.wp-block-site-logo.aligncenter {
|
||||
display: table;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
text-align: center;
|
||||
}
|
||||
.wp-block-site-logo.is-style-rounded {
|
||||
border-radius: 9999px;
|
||||
|
||||
@ -1 +1 @@
|
||||
.wp-block-site-logo{line-height:0}.wp-block-site-logo a{display:inline-block}.wp-block-site-logo.is-default-size img{width:120px;height:auto}.wp-block-site-logo a,.wp-block-site-logo img{border-radius:inherit}.wp-block-site-logo.aligncenter{display:table}.wp-block-site-logo.is-style-rounded{border-radius:9999px}
|
||||
.wp-block-site-logo{line-height:0}.wp-block-site-logo a{display:inline-block}.wp-block-site-logo.is-default-size img{width:120px;height:auto}.wp-block-site-logo a,.wp-block-site-logo img{border-radius:inherit}.wp-block-site-logo.aligncenter{margin-right:auto;margin-left:auto;text-align:center}.wp-block-site-logo.is-style-rounded{border-radius:9999px}
|
||||
@ -89,7 +89,9 @@
|
||||
border-radius: inherit;
|
||||
}
|
||||
.wp-block-site-logo.aligncenter {
|
||||
display: table;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
}
|
||||
.wp-block-site-logo.is-style-rounded {
|
||||
border-radius: 9999px;
|
||||
|
||||
@ -1 +1 @@
|
||||
.wp-block-site-logo{line-height:0}.wp-block-site-logo a{display:inline-block}.wp-block-site-logo.is-default-size img{width:120px;height:auto}.wp-block-site-logo a,.wp-block-site-logo img{border-radius:inherit}.wp-block-site-logo.aligncenter{display:table}.wp-block-site-logo.is-style-rounded{border-radius:9999px}
|
||||
.wp-block-site-logo{line-height:0}.wp-block-site-logo a{display:inline-block}.wp-block-site-logo.is-default-size img{width:120px;height:auto}.wp-block-site-logo a,.wp-block-site-logo img{border-radius:inherit}.wp-block-site-logo.aligncenter{margin-left:auto;margin-right:auto;text-align:center}.wp-block-site-logo.is-style-rounded{border-radius:9999px}
|
||||
@ -1242,7 +1242,7 @@ class WP_Theme_JSON {
|
||||
$new_key = $prefix . str_replace(
|
||||
'/',
|
||||
'-',
|
||||
strtolower( preg_replace( '/(?<!^)[A-Z]/', '-$0', $property ) ) // CamelCase to kebab-case.
|
||||
strtolower( _wp_to_kebab_case( $property ) )
|
||||
);
|
||||
|
||||
if ( is_array( $value ) ) {
|
||||
|
||||
@ -199,11 +199,6 @@
|
||||
"slug": "small",
|
||||
"size": "13px"
|
||||
},
|
||||
{
|
||||
"name": "Normal",
|
||||
"slug": "normal",
|
||||
"size": "16px"
|
||||
},
|
||||
{
|
||||
"name": "Medium",
|
||||
"slug": "medium",
|
||||
@ -215,8 +210,8 @@
|
||||
"size": "36px"
|
||||
},
|
||||
{
|
||||
"name": "Huge",
|
||||
"slug": "huge",
|
||||
"name": "Extra Large",
|
||||
"slug": "x-large",
|
||||
"size": "42px"
|
||||
}
|
||||
],
|
||||
|
||||
@ -307,7 +307,7 @@ function _unhook_block_registration() {
|
||||
remove_action( 'init', 'register_block_core_calendar' );
|
||||
remove_action( 'init', 'register_block_core_categories' );
|
||||
remove_action( 'init', 'register_block_core_file' );
|
||||
remove_action( 'init', 'register_block_core_gallery', 20 );
|
||||
remove_action( 'init', 'register_block_core_gallery' );
|
||||
remove_action( 'init', 'register_block_core_image' );
|
||||
remove_action( 'init', 'register_block_core_latest_comments' );
|
||||
remove_action( 'init', 'register_block_core_latest_posts' );
|
||||
|
||||
@ -647,12 +647,12 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
|
||||
/**
|
||||
* @ticket 54336
|
||||
*/
|
||||
public function test_get_stylesheet_generates_proper_classes_from_slugs() {
|
||||
public function test_get_stylesheet_generates_proper_classes_and_css_vars_from_slugs() {
|
||||
$theme_json = new WP_Theme_JSON(
|
||||
array(
|
||||
'version' => WP_Theme_JSON::LATEST_SCHEMA,
|
||||
'settings' => array(
|
||||
'color' => array(
|
||||
'color' => array(
|
||||
'palette' => array(
|
||||
array(
|
||||
'slug' => 'grey',
|
||||
@ -672,6 +672,9 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
|
||||
),
|
||||
),
|
||||
),
|
||||
'custom' => array(
|
||||
'white2black' => 'value',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
@ -681,7 +684,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
|
||||
$theme_json->get_stylesheet( array( 'presets' ) )
|
||||
);
|
||||
$this->assertEquals(
|
||||
'body{--wp--preset--color--grey: grey;--wp--preset--color--dark-grey: grey;--wp--preset--color--light-grey: grey;--wp--preset--color--white-2-black: grey;}',
|
||||
'body{--wp--preset--color--grey: grey;--wp--preset--color--dark-grey: grey;--wp--preset--color--light-grey: grey;--wp--preset--color--white-2-black: grey;--wp--custom--white-2-black: value;}',
|
||||
$theme_json->get_stylesheet( array( 'variables' ) )
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user