From ba27cabce4cca7009b43c87643a911b9d069aeba Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Fri, 23 Aug 2024 07:57:15 +0700 Subject: [PATCH] Admin bar: fix icon colors on site frontend (#39014) --- .../jetpack-mu-wpcom/changelog/fix-frontend-icon-color | 4 ++++ .../src/features/wpcom-admin-bar/wpcom-admin-bar.php | 2 +- .../src/features/wpcom-admin-bar/wpcom-admin-bar.scss | 5 +---- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/fix-frontend-icon-color diff --git a/projects/packages/jetpack-mu-wpcom/changelog/fix-frontend-icon-color b/projects/packages/jetpack-mu-wpcom/changelog/fix-frontend-icon-color new file mode 100644 index 0000000000000..877c3d7bcef4d --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/fix-frontend-icon-color @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Admin bar: fix icon colors on site frontend diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php index 644c536dc242c..e13c6af186447 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php @@ -83,7 +83,7 @@ function wpcom_enqueue_admin_bar_assets() { ); } - $admin_color = get_user_option( 'admin_color' ); + $admin_color = is_admin() ? get_user_option( 'admin_color' ) : 'fresh'; $admin_icon_color = WPCOM_ADMIN_ICON_COLORS[ $admin_color ] ?? WPCOM_ADMIN_ICON_COLORS['fresh']; // Force the icon colors to have desktop color even on mobile viewport. diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.scss b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.scss index 4d99d56e1972e..3630aba0ebd14 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.scss +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.scss @@ -179,11 +179,8 @@ #wp-admin-bar-help-center { display: block !important; - width: 52px !important; + width: 49px !important; margin-right: 0 !important; - .ab-item { - width: 52px; - } } #wp-admin-bar-notes {