Fixed: Admin Style: Plugin links change styles on updates on 7.0#11390
Fixed: Admin Style: Plugin links change styles on updates on 7.0#11390OpuRockey wants to merge 2 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
rbcorrales
left a comment
There was a problem hiding this comment.
I tested this locally. The base fix works and the underline and color shift on plugin action links go away after adding .updated to the <tr>.
I think the selector approach should follow @joedolson's suggestion though. The rest of common.css already uses div.updated consistently, so changing to div.updated a would match the existing pattern. Admin notices are always rendered as <div> elements (via wp_get_admin_notice()), so scoping to div.updated is safe and more precise than :not(tr).
The main difference is that div.updated a is an allowlist (only match the known good case) while .updated:not(tr) a is a blocklist (exclude the known bad case).
The .updated a:hover and .updated a:focus selectors have the same issue and should get the same treatment. In practice the hover color doesn't change visibly because table-specific hover rules win the cascade, but the selectors still technically match tr.updated and should be fixed for correctness.
I left inline suggestions on all three selectors.
| .notice a, | ||
| .error a, | ||
| .updated a { | ||
| .updated:not(tr) a { |
There was a problem hiding this comment.
| .updated:not(tr) a { | |
| div.updated a { |
|
|
||
| .notice a:hover, | ||
| .error a:hover, | ||
| .updated a:hover { |
There was a problem hiding this comment.
| div.updated a:hover { |
|
|
||
| .notice a:focus, | ||
| .error a:focus, | ||
| .updated a:focus { |
There was a problem hiding this comment.
| div.updated a:focus { |
Ticket: https://core.trac.wordpress.org/ticket/64976
Summary
Fixes an issue where plugin action links in the admin interface change styles unexpectedly after updates (targeted for WordPress 7.0).
Problem
On the Plugins screen, action links (e.g., Activate, Deactivate, Settings) do not consistently retain their intended admin styles after a plugin update. This results in inconsistent UI appearance and deviates from the expected admin design system.
Solution
This PR ensures that plugin action links consistently use the correct admin styles after updates by aligning them with the updated admin design system and preventing unintended style overrides.
Changes Included
Testing Steps
Expected Result
Plugin action links should maintain consistent styling aligned with the WordPress admin UI both before and after plugin updates.