-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Button preview doesn't match styling #21954
Comments
@dreamwhisper thanks for reporting this! Good catch. I tested this and was able to replicate with Gutenberg 7.9.1: Here's a video showing the entire experience: https://cloudup.com/cEoSvU-JI5M Oddly, it displays properly after publishing! |
@youknowriad will this revert #21923 resolve the above? |
Potentially, but this is more complex than it seems: The "example" used in the previews use a "green" background color. So in theory, this color should be visible no matter the variation unless the CSS of the style variations has a higher specificity. So technically, showing the background color or not in the preview is not a bug either way, it's a choice made by the "style variation" to support custom backgrounds or not. The revert might have changed the specificity causing the background to not be applied anymore. |
It's a small item in the grand scheme of things, but is there a reason for using the "green" 5.4 markup is this:
vs
The color is not correct for our default button because |
@dreamwhisper that color should definitely be removed from the "example" of the Button block because it's not theme agnostic. We could replace it with a custom color instead of a palette color. |
This wouldn't be so much of an issue, as the theme could easily overwrite it. But I noticed that as soon as I add a |
My temporary workaround is to delete following code in |
This is still an issue. For what it's worth, applying a style override in editor styles worked for me (horrible hacky solution and hopefully not a long term one).
|
Describe the bug
The style preview for buttons no longer matches the button being edited.
To reproduce
Steps to reproduce the behavior:
Note: it never matched custom color selections or border radius option, only the default.
Expected behavior
Button previews will match the button style.
Screenshots
If applicable, add screenshots to help explain your problem.
WordPress 5.4
Master
7.9.1
Editor version (please complete the following information):
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: