Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block button element visited styles need to be more consistent #45229

Open
carolinan opened this issue Oct 23, 2022 · 1 comment
Open

Block button element visited styles need to be more consistent #45229

carolinan opened this issue Oct 23, 2022 · 1 comment
Labels
[Block] Buttons Affects the Buttons Block [Type] Enhancement A suggestion for improvement.

Comments

@carolinan
Copy link
Contributor

carolinan commented Oct 23, 2022

Description

The file block download button is the only wp-element-button item that styles the visited state with CSS.
There is a risk that the text color is white on white background, since the text color is set to $white.
If a theme uses theme.json elements.button, the file block button will look different than all other buttons, unless
the theme also styles the visited state.

This needs to be more consistent across the blocks that has buttons. Either all buttons need to have the same default visited style, or the visited style should be removed from the file block.

(This is relevant for blocks that has buttons, not editor interface components that uses buttons).

Step-by-step reproduction instructions

Activate Twenty Twenty-Three.
If you test with a different block theme, it needs to be one where the button text is not white, or you will not see the color issue. In TT2, this issue is not visible.

Create a new post or page,
Add a button block and a file block with a download button.
Save and view the post/page on the front.
Compare the visited state of the two button links:
The button block is green with black text.
The file block button is green with white text.

Note: This is also being fixed in Twenty Twenty-Three, so you need a version of the theme where the fix has not been applied yet. For example the theme version that is in WordPress 6.1-RC2.

Screenshots, screen recording, code snippet

Visited state:
image

Environment info

Gutenberg Version 14.3.1
WordPress 6.1-RC2-54653 via the beta tester plugin.

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

Yes

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

No

@kathrynwp kathrynwp added [Type] Enhancement A suggestion for improvement. [Block] Buttons Affects the Buttons Block labels Oct 24, 2022
@skorasaurus
Copy link
Member

related: #34448 and #27760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants