Skip to content

Commit 0742ed6

Browse files
MaggieCabreraclaude
andcommitted
Ipsum: Keep the outline Search button the same size on hover.
The Outline style gave the Search icon button a 1px dotted border that went away on hover, so the button shrank by 2px under the pointer and flickered. It now keeps a transparent border in every state. Synced from WordPress/ipsum#251. See #66817. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
1 parent a06df3a commit 0742ed6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎src/wp-content/themes/ipsum/functions.php‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,20 @@ function ipsum_register_block_styles() {
280280
* Outlines the Search button until it is hovered, focused or pressed, when
281281
* the global button states take back over. A theme.json css string would
282282
* wrap this in :where() and only tie with the global button styles.
283+
* The icon button keeps a transparent border in those states, so it does
284+
* not shrink by 2px under the pointer on hover, which made it flicker.
285+
* The text button already has a border there from theme.json.
283286
*/
284287
register_block_style(
285288
'core/search',
286289
array(
287290
'name' => 'outline',
288291
'label' => _x( 'Outline', 'Block style label', 'ipsum' ),
289292
'inline_style' => '
293+
.wp-block-search.is-style-outline .wp-block-search__button.has-icon.wp-element-button {
294+
border: 1px solid transparent;
295+
}
296+
290297
.wp-block-search.is-style-outline .wp-block-search__button.wp-element-button:not(:hover):not(:focus):not(:active) {
291298
background-color: var(--wp--preset--color--base);
292299
border: 1px dotted var(--wp--preset--color--contrast);

0 commit comments

Comments
 (0)