[wp-trac] [WordPress Trac] #51927: Twenty Twenty-One: Buttons lose contrast consistency in dark-mode.

WordPress Trac noreply at wordpress.org
Wed Jan 20 05:49:42 UTC 2021


#51927: Twenty Twenty-One: Buttons lose contrast consistency in dark-mode.
-----------------------------------+-----------------------------
 Reporter:  allancole              |       Owner:  SergeyBiryukov
     Type:  defect (bug)           |      Status:  closed
 Priority:  normal                 |   Milestone:  5.7
Component:  Bundled Theme          |     Version:  5.6
 Severity:  normal                 |  Resolution:  fixed
 Keywords:  2nd-opinion has-patch  |     Focuses:  css
-----------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"49987" 49987]:
 {{{
 #!CommitTicketReference repository="" revision="49987"
 Twenty Twenty-One: Clean up Button styles.

 This change restructures the Button element styles for better a11y and
 expected color behaviors. Here what has changed:

 - The `button-style()` mixin is now the ''single source or truth'' for how
 Button should look site-wide.
   - Button Block, File Block, and Search form Blocks all rely on this one
 mixin.
   - The same styles is also applied to the `<button>` element which
 appears in widgets, the 404 search form and comments form.
 - Improves expected button styles for various conditions and contexts as
 follows:
   - User color palette selections for Buttons are retained regardless of a
 parent block’s color settings or dark-mode.
   - Supports both Default/Filled styles and Outline styles.
   - More consistent `:hover` and `:active` styles.
   - `:focus` styles are now always visible and legible.
 - Adds a `--local-color` color variable to scope color relationships to
 nested blocks.
 - Reduces selectors in `style.css` output.
 - 1:1 experience between editor and front end button styles.
 - Properly supports Dark-mode.

 Props allancole, poena, scruffian, megphillips91.
 Fixes #51927.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51927#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list