Twenty Thirteen: Add "No Shadow" style to button block.

This creates a new block style without a shadow, and fixes colors on outline buttons.

Props melchoyce, kjellr, scruffian.
Fixes #51223.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryelle 2021-06-08 20:37:58 +00:00
parent 91c19c69c2
commit 8ace500967
4 changed files with 41 additions and 5 deletions

View File

@ -370,15 +370,20 @@ body:not(.sidebar) .wp-block-table.alignfull {
.entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:focus,
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover,
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):focus {
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):focus,
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):hover,
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):focus {
background: #ed6a31;
color: #fff;
}
.wp-block-button.is-style-outline .wp-block-button__link {
background-color: inherit;
border-color: inherit;
border-width: 2px;
border-color: inherit;
}
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background) {
background-color: inherit;
}
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
@ -407,6 +412,10 @@ body:not(.sidebar) .wp-block-table.alignfull {
padding: 10px 24px 11px;
}
.entry-content .wp-block-button.is-style-no-shadow .wp-block-button__link {
border-bottom: none;
}
/* Separator */
.wp-block-separator {

View File

@ -351,7 +351,7 @@ p.has-drop-cap:not(:focus)::first-letter {
color: #fff;
}
.is-style-outline .wp-block-button__link {
.is-style-outline .wp-block-button__link:not(.has-text-color) {
border-width: 2px;
color: #e05d22;
}
@ -361,6 +361,10 @@ p.has-drop-cap:not(:focus)::first-letter {
background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%); /* W3C */
}
.wp-block-button.is-style-no-shadow .wp-block-button__link {
border-bottom: none;
}
/* Separator */
.editor-block-list__block hr.wp-block-separator {

View File

@ -835,3 +835,26 @@ if ( ! function_exists( 'wp_body_open' ) ) :
do_action( 'wp_body_open' );
}
endif;
/**
* Register Custom Block Styles
*
* @since Twenty Thirteen 3.4
*/
if ( function_exists( 'register_block_style' ) ) {
function twentythirteen_register_block_styles() {
/**
* Register block style
*/
register_block_style(
'core/button',
array(
'name' => 'no-shadow',
'label' => __( 'No Shadow', 'twentythirteen' ),
'style_handle' => 'no-shadow',
)
);
}
add_action( 'init', 'twentythirteen_register_block_styles' );
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-51109';
$wp_version = '5.8-alpha-51110';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.