diff --git a/src/wp-content/themes/ipsum/DESIGN.md b/src/wp-content/themes/ipsum/DESIGN.md index b37a7a4f43745..404d7410f04ed 100644 --- a/src/wp-content/themes/ipsum/DESIGN.md +++ b/src/wp-content/themes/ipsum/DESIGN.md @@ -30,7 +30,7 @@ How the palettes are built: ### Usage rules - **Use the slugs, never literal colors.** `var(--wp--preset--color--contrast)` in CSS, `var:preset|color|contrast` in block attributes, or `textColor` and `backgroundColor`. A literal hex freezes one variation's look into all the others. -- **Text is Contrast.** Body, headings and links all use it. Hover goes to Strong Contrast. Contrast is translucent in the light palettes, so it only reads as intended on Base or Surface; on any other ground, use Strong Contrast. +- **Text is Contrast.** Body, headings and links all use it. Hover goes to Strong Contrast. Contrast is translucent in the light palettes, so it only reads as intended on Base or Surface; on any other ground, use Strong Contrast. The editor's "Transparent text may be hard for people to read" notice is expected for it; keep the alpha. - **Links** have a dotted 1px underline. On hover they turn Strong Contrast and lose the underline. Navigation, post title, post navigation and pagination links do the reverse: no underline until hover. - **Buttons** fill with Contrast, with Base text, and fill with Strong Contrast on hover. Focus and press use Contrast at 85% (`color-mix()`). The Outline style keeps a Contrast border and fills with Surface on hover. - **Form fields** in Search and the comment form are Base with Contrast text and border. The border turns Strong Contrast on hover. Jetpack form fields get the same border. diff --git a/src/wp-content/themes/ipsum/functions.php b/src/wp-content/themes/ipsum/functions.php index eab1a8be0e4fa..0df9a374477fd 100644 --- a/src/wp-content/themes/ipsum/functions.php +++ b/src/wp-content/themes/ipsum/functions.php @@ -280,6 +280,9 @@ function ipsum_register_block_styles() { * Outlines the Search button until it is hovered, focused or pressed, when * the global button states take back over. A theme.json css string would * wrap this in :where() and only tie with the global button styles. + * The icon button keeps a transparent border in those states, so it does + * not shrink by 2px under the pointer on hover, which made it flicker. + * The text button already has a border there from theme.json. */ register_block_style( 'core/search', @@ -287,6 +290,10 @@ function ipsum_register_block_styles() { 'name' => 'outline', 'label' => _x( 'Outline', 'Block style label', 'ipsum' ), 'inline_style' => ' + .wp-block-search.is-style-outline .wp-block-search__button.has-icon.wp-element-button { + border: 1px solid transparent; + } + .wp-block-search.is-style-outline .wp-block-search__button.wp-element-button:not(:hover):not(:focus):not(:active) { background-color: var(--wp--preset--color--base); border: 1px dotted var(--wp--preset--color--contrast); diff --git a/src/wp-content/themes/ipsum/patterns/archive-full.php b/src/wp-content/themes/ipsum/patterns/archive-full.php index bf155d31dc2e2..ac9f1b8e4cb07 100644 --- a/src/wp-content/themes/ipsum/patterns/archive-full.php +++ b/src/wp-content/themes/ipsum/patterns/archive-full.php @@ -16,7 +16,7 @@