From f5d686671cda4c17e4b578acaf7d81f7c4d5bf9b Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 28 Jun 2022 15:28:41 +0100 Subject: [PATCH 1/2] Button Elements: Allow element styles in classic themes --- lib/compat/wordpress-6.0/get-global-styles-and-settings.php | 4 +--- lib/compat/wordpress-6.1/theme.json | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/compat/wordpress-6.0/get-global-styles-and-settings.php b/lib/compat/wordpress-6.0/get-global-styles-and-settings.php index bb8819ec2ef257..5768b4cba80986 100644 --- a/lib/compat/wordpress-6.0/get-global-styles-and-settings.php +++ b/lib/compat/wordpress-6.0/get-global-styles-and-settings.php @@ -92,9 +92,7 @@ function gutenberg_get_global_stylesheet( $types = array() ) { } $tree = WP_Theme_JSON_Resolver_Gutenberg::get_merged_data(); $supports_theme_json = WP_Theme_JSON_Resolver_Gutenberg::theme_has_support(); - if ( empty( $types ) && ! $supports_theme_json ) { - $types = array( 'variables', 'presets' ); - } elseif ( empty( $types ) ) { + if ( empty( $types ) ) { $types = array( 'variables', 'styles', 'presets' ); } diff --git a/lib/compat/wordpress-6.1/theme.json b/lib/compat/wordpress-6.1/theme.json index d036c158d2f8ea..f0869ce33b8954 100644 --- a/lib/compat/wordpress-6.1/theme.json +++ b/lib/compat/wordpress-6.1/theme.json @@ -246,6 +246,9 @@ "text": "#fff", "background": "#32373c" }, + "spacing": { + "padding": "calc(0.667em + 2px) calc(1.333em + 2px)" + }, "typography": { "fontSize": "inherit", "fontFamily": "inherit", From d93f448dad9a13bafbdfc1009a78f7a501992a7f Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Thu, 30 Jun 2022 12:42:48 +0100 Subject: [PATCH 2/2] move the padding rules to the opinionated styles --- packages/block-library/src/search/theme.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-library/src/search/theme.scss b/packages/block-library/src/search/theme.scss index f95849183b5f6f..b07ffa98531b70 100644 --- a/packages/block-library/src/search/theme.scss +++ b/packages/block-library/src/search/theme.scss @@ -3,3 +3,8 @@ font-weight: bold; } } + +.wp-block-search__button { + border: 1px solid #ccc; + padding: 0.375em 0.625em; +}