Skip to content

Commit

Permalink
Fix Theme buttons have correct visited style (#37343)
Browse files Browse the repository at this point in the history
* Fixed an error when displaying visited buttons on the themes page on wp-admin

* changelog

* Fixed on load-themes

* Set a more specific CSS selector

* Moved the fix to its own function so that it is semantically correct

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/9061780177

Upstream-Ref: Automattic/jetpack@6eb0b61
  • Loading branch information
rcrdortiz authored and matticbot committed May 13, 2024
1 parent d5273a6 commit 6f0cf4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/features/wpcom-themes/css/ui-fixes.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.theme-browser .button:visited {
color: #fff;
}
13 changes: 13 additions & 0 deletions src/features/wpcom-themes/wpcom-themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,16 @@ function wpcom_themes_remove_wpcom_actions() {
);
}
add_action( 'load-themes.php', 'wpcom_themes_remove_wpcom_actions' );

/**
* Adds a CSS file to fix UI issues in the theme browser.
*/
function wpcom_themes_load_ui_fixes() {
wp_enqueue_style(
'wpcom-themes-ui-fixes',
plugins_url( 'css/ui-fixes.css', __FILE__ ),
array(),
Jetpack_Mu_Wpcom::PACKAGE_VERSION
);
}
add_action( 'load-themes.php', 'wpcom_themes_load_ui_fixes' );

0 comments on commit 6f0cf4e

Please sign in to comment.