-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove specificify for link color #31497
Conversation
Size Change: -26 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Tested this with TT1, TT1-blocks, and Empty theme. Can't repro the bug so I believe this is fine to go. Going to fix the tests now. |
@@ -251,7 +251,7 @@ class WP_Theme_JSON { | |||
); | |||
|
|||
const ELEMENTS = array( | |||
'link' => 'a:not(.wp-block-button_link)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It definitely makes sense to avoid tying the elements selector to specific block selectors.
If we do find an issue with the change, we may want to consider adding specificity to the block itself.
Updated the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a good change that adds only the necessary specificity, and it fixes the problem I was seeing with the navigation block. Before:
After:
I would encourage sanity checks by others more familiar with the intricacies of global styles, but from my perspective, this is a solid win. Thank you!
Going to go ahead with this so it can be part of 10.6. If folks report a scenario in which the button block (or any other) conflicts with this we can look at it separately. |
I tested this against the old issue and I didn't see any regressions. Thanks - this is much cleaner. |
See #30541 (comment)
:not(.wp-block-button_link)
negation so buttons within groups didn't get styled with the link colorIt was reported to cause issues with navigations but also with any other block that may use the
a
element. This PR explores removing that negation.How to test