-
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
Setting a link color on a parent block overrides icon and button colors #33437
Comments
Came here to report the same issue. |
The "fix" for this is to add more However this would not be a proper fix as we then get into a seemingly never ending pathway of adding |
I've got a potential fix at #34689 and would like help in testing it. Does the PR list all the use cases that we need to take care of? |
That's not the perfect solution.
Yes, I call this the "hell of
Removing important on initial styles in core should help. See also #34575. I've seen a css framework wich uses tons of classes for elements to adjust styles: <style>
.border-color-blue ...
.text-color-blue ...
.bg-color-white ...
.text-underlined ...
.border-width-1 ...
.border-solid ...
</style>
...
<a href="#more" class="
border-color-blue
text-color-blue
text-underlined
bg-color-white
border-width-1
border-solid
">...more</a> But the code above is most flexible for all things. Perhaps this may be a solution for core styles. |
Description
Setting a link color on a parent block overrides icon and button colors, but only on the frontend of the site.
Initially reported in WordPress/pattern-directory#235, can be seen (for now) on these patterns:
Step-by-step reproduction instructions
Also happens with social icons.
Expected behaviour
The editor behavior seems correct - the button text should use the set text color.
Actual behaviour
The injected style in
.wp-elements-<uuid>
overrides the button's inline style, because it's set to!important
.Screenshots or screen recording (optional)
Code snippet (optional)
Block code
WordPress information
The text was updated successfully, but these errors were encountered: