-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Outlined button block does not apply custom text color #24625
Comments
Also, is there any reason to force a specific text color on outlined button? I went ahead and adapted the pull request to inherit the text color of the container. |
Hi guys, Is there any update on this please? Are theme developers stuck by forcing custom theme color styles with very high specificity selectors or I can see this is not an isolated issue with block colors since WP5.5 update: check the issue #25290 for example. Thanks for any feedback provided. Regards, Oliver |
I can no longer reproduce this issue in WP 5.5.3; it may have been fixed in the meantime. Can you confirm this, @webmandesign ? |
Please note that it depends highly on a theme you are using. If the theme has sufficient enough selector specificity for its color classes, then you don't experience the issue. However, it's still present as the code in current Gutenberg v9.3.0 hasn't changed and it still forces a specific color (at least it should be set to Example:If your theme followed Gutenberg handbook to apply Gutenberg support for color palettes, it is using pure, straightforward In this case Gutenberg's Button block code takes over and overrides the simple class selector of the theme and thus not applying a custom color as expected. Solution for theme author is to use higher specificity selector for the theme color classes such as Besides, there is really no reason why Gutenberg applies specific color ( My patch #24626 fixes both of these issues. Please check. |
Thanks for working on this @webmandesign ! Looks like we'll be going with #26707 instead, as it fixes the issue for both |
Hi @tellthemachines Thanks for the info. Please read my feedback on #26707 for more information. |
To reduce potential of style conflicts. (+2 squashed commits) Squashed commits: [4a3717f8da] Inherit a text color for outlined button, not forcing a specific one [8b062a80bd] Do not apply text color if it is being overriden Fixing WordPress#24625
Describe the bug
If I apply a text color on an outlined button, the color is not applied as default text color from the block itself is overriding it.
(The issue is described at WordPress support ticket.)
To reproduce
Steps to reproduce the behavior:
Button now has the
#32373c
($dark-gray-700
) color instead of the custom theme-predefined color.Expected behavior
Once a theme-predefined color class is set on button link, it should not apply any other text color.
Editor version (please complete the following information):
The text was updated successfully, but these errors were encountered: