[wp-trac] [WordPress Trac] #63291: Twenty Twenty-One: fix text color in Cover block (was: Twenty Twenty-One: fix text color in starter content)

WordPress Trac noreply at wordpress.org
Mon May 5 20:33:11 UTC 2025


#63291: Twenty Twenty-One: fix text color in Cover block
-------------------------------------------------+-------------------------
 Reporter:  trushaamin                           |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Bundled Theme                        |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch changes-requested has-     |     Focuses:  css
  testing-info                                   |
-------------------------------------------------+-------------------------
Changes (by sabernhardt):

 * severity:  minor => normal
 * version:  5.6 =>
 * milestone:  Awaiting Review => Future Release


Comment:

 The starter content uses a 'Links area' block pattern, which includes a
 Cover block. A Group block can display that content the same way more
 reliably, and I uploaded [attachment:"63291.replace-cover-block.diff"] to
 consider changing both the pattern and starter content.

 As noted in comment:5, the white text—for the entire Cover block—is the
 wrong color against the light green or against any light overlay. It comes
 from the block library styles added in GB41572.

 If a light Cover block specifies a dark text color, it seems to work
 properly on the front end. However, the theme sets a white text color
 [https://github.com/WordPress/wordpress-
 develop/blob/e7855d934861319deb0e2757a25d00a4d0ff90d6/src/wp-
 content/themes/twentytwentyone/assets/sass/05-blocks/cover/_editor.scss#L35-L44
 in the editor] whenever the block's element lacks a `has-*-background-
 color` class. Since those classes were moved to the overlay span, `.wp-
 block-cover:not([class*="background-color"])` could match any Cover block.

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


More information about the wp-trac mailing list