Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}

Expand Down
3 changes: 3 additions & 0 deletions lib/compat/wordpress-6.1/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@
"text": "#fff",
"background": "#32373c"
},
"spacing": {
"padding": "calc(0.667em + 2px) calc(1.333em + 2px)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what to do about this. In the theme I tested, the theme reset the padding for buttons. This padding is the one that used to be provided by the button block, but the search block uses a different padding. If we don't provide this then themes with heavy handed resets will lose button padding, but if we do provide this then the search block buttons will end up using this padding instead of the default specified in the block CSS. IMO this is a better compromise, but it will impact on the search button padding slightly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is likely one of the smaller problems and I too agree that the second evil is lesser.

},
"typography": {
"fontSize": "inherit",
"fontFamily": "inherit",
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/search/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
font-weight: bold;
}
}

.wp-block-search__button {
border: 1px solid #ccc;
padding: 0.375em 0.625em;
}