Opened 3 years ago
Closed 5 months ago
#54204 closed defect (bug) (worksforme)
Twenty Twenty-One: <button>s are not styled in block editor
Reported by: | zebulan | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.8.1 |
Component: | Bundled Theme | Keywords: | has-screenshots close |
Focuses: | css | Cc: |
Description
The title says it all.
Attachments (6)
Change History (16)
#3
@
3 years ago
@aezazshekh I'm talking about HTML <button>s, not Gutenberg "Button" blocks, which are <a>s, not <button>s. Try putting a <button> inside a Paragraph block and comparing how it looks in the editor versus the front-end.
#4
@
3 years ago
@sabernhardt Custom HTML blocks don't have proper editor styling anyway; that's a separate issue. See https://github.com/WordPress/gutenberg/issues/9129.
But you can also put a <button>
inside a Paragraph block, and that should (but doesn't) look just like it does on the front-end.
#5
@
3 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
Welcome to Trac! (I've noticed you on Gutenberg before, but this is your first ticket here.)
Yes, the button element is a little different inside a Paragraph block instead of the Custom HTML. The editor probably should have the same basic button styling for both situations in the theme, if possible.
#6
@
3 years ago
Just to clarify (in case anyone reading this is still confused), my issue is not that the <button> looks different in the Paragraph block versus the Custom HTML block in the editor (which is covered by the previously-linked Gutenberg GitHub issue). The issue I'm reporting is that <button>s in the editor look different from the front-end, regardless of what block the <button> appears in.
#7
@
2 years ago
I tested in 5.3, 5.6 and 6.0.
-From 5.6, HTML buttons in the front and in the editor look like plain browser default HTML buttons, and does not have the spacing and colors that the button block does.
-In 6.0, there is a text alignment issue in the editor where the text inside the button is at the bottom of the button instead of centered.
I did not go as far as to track down the change, I suspect it would have been because the style bled into the WordPress editor UI buttons.
Hello @zebulan. Thanks for this ticket.
I saw but my button is showing the same in the backend as it is in the front end. Can you tell me in detail about this ticket?