Skip to content

Buttons that don't have .wp-element-button class have wrong text color #45213

@luminuu

Description

@luminuu

Description

I was currently testing Twenty Twenty-Three with the Pilgrimage style variation and imported the official Theme Unit Test data into my installation. Looking at the Block: Button post, I noticed this behaviour of the buttons:

image

The text color of the button is the same as the default link color, combined with the button gradient it's almost unreadable. Here's what happens in the CSS:

image

I've found this issue: #42616 and the related PR: #42669, which update the code to the a:where(:not(.wp-element-button)). However this doesn't take into account that there's lots of buttons in already existing content out there that don't have the .wp-element-button class assigned, as this one got introduced in May this year (#40260). Using a newer block theme will in the worst case, make the buttons not usable until the post gets saved one more time, when the .wp-element-button class is added to the button blocks.

I think the following issue relates in some form to this: #44166

Step-by-step reproduction instructions

  1. Install WordPress 6.1-RC2.
  2. Import Theme Unit Test data.
  3. Go to the site editor.
  4. From the Twenty Twenty-Three style variations, choose "Pilgrimage".
  5. Open the "Block: Button" blog post.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.1 RC2
  • Twenty Twenty-Three

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] ButtonsAffects the Buttons Block[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions