Skip to content

Commit

Permalink
Admin bar: align colors with Calypso's (#39314)
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar authored Sep 13, 2024
1 parent 12cd610 commit 57aef23
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 40 deletions.
4 changes: 4 additions & 0 deletions projects/packages/jetpack-mu-wpcom/changelog/admin-bar-colors
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Admin bar: align colors with Calypso's
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// The $icon-color variable for admin color schemes.
// See: https://github.com/WordPress/wordpress-develop/blob/679cc0c4a261a77bd8fdb140cd9b0b2ff80ebf37/src/wp-admin/css/colors/_variables.scss#L9
// Only the ones different from the "fresh" scheme are listed.
// Only Core schemes are listed here. Calypso schemes all use #ffffff.
const WPCOM_ADMIN_ICON_COLORS = array(
'blue' => '#e5f8ff',
'coffee' => '#f3f2f1',
Expand Down Expand Up @@ -82,7 +82,7 @@ function wpcom_enqueue_admin_bar_assets() {
}

$admin_color = is_admin() ? get_user_option( 'admin_color' ) : 'fresh';
$admin_icon_color = WPCOM_ADMIN_ICON_COLORS[ $admin_color ] ?? WPCOM_ADMIN_ICON_COLORS['fresh'];
$admin_icon_color = WPCOM_ADMIN_ICON_COLORS[ $admin_color ] ?? '#ffffff';

// Force the icon colors to have desktop color even on mobile viewport.
wp_add_inline_style(
Expand Down
4 changes: 4 additions & 0 deletions projects/packages/masterbar/changelog/admin-bar-colors
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Admin bar: align colors with Calypso's
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,14 @@ ul#adminmenu > li.current > a.current:after {
#wpadminbar a.ab-item,
#wpadminbar > #wp-toolbar span.ab-label,
#wpadminbar > #wp-toolbar span.noticon {
color: #f0f0f1;
color: #ffffff;
}

#wpadminbar .ab-icon,
#wpadminbar .ab-icon:before,
#wpadminbar .ab-item:before,
#wpadminbar .ab-item:after {
color: #a7aaad;
color: #ffffff;
}

#wpadminbar:not(.mobile) .ab-top-menu > li:hover > .ab-item,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ $body-background: $studio-gray-0; // Calypso --color-surface-backdrop
$menu-text: $studio-white; // Calypso --color-sidebar-text
$menu-background: $studio-blue-60; // Calypso --color-sidebar-background
$menu-highlight-text: $studio-white; // Calypso --color-sidebar-menu-hover-text
$menu-highlight-icon: $menu-highlight-text;
$menu-highlight-icon: $studio-yellow-20;
$menu-highlight-background: $studio-blue-50; // Calypso --color-sidebar-menu-hover-background
$menu-current-text: $studio-blue-90; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
$menu-current-background: $studio-yellow-20; // Calypso --color-sidebar-menu-selected-background
$menu-submenu-text: $studio-white; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-blue-80; // Calypso --color-sidebar-submenu-background
$menu-submenu-text: $studio-gray-10; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-blue-90; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-yellow-20; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-white; // Calypso --color-sidebar-submenu-text
$adminbar-avatar-frame: $studio-blue-80;

// masterbar overrides
$masterbar-background: $studio-blue-80; // Calypso --color-masterbar-background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ $body-background: $studio-gray-0; // Calypso --color-surface-backdrop
$menu-text: $studio-gray-80; // Calypso --color-sidebar-text
$menu-background: $studio-gray-5; // Calypso --color-sidebar-background
$menu-highlight-text: $studio-blue-50; // Calypso --color-sidebar-menu-hover-text
$menu-highlight-icon: $menu-highlight-text;
$menu-highlight-icon: $studio-orange-30;
$menu-highlight-background: $studio-white; // Calypso --color-sidebar-menu-hover-background
$menu-current-text: $studio-white; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
$menu-current-background: $studio-gray-60; // Calypso --color-sidebar-menu-selected-background
$menu-submenu-text: $studio-white; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-blue-60; // Calypso --color-sidebar-submenu-background
$menu-submenu-text: $studio-gray-10; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-blue-70; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-orange-30; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-white; // Calypso --color-sidebar-submenu-text
$adminbar-avatar-frame: $studio-blue-70;

// masterbar overrides
$masterbar-background: $studio-blue-60; // Calypso --color-masterbar-background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ $body-background: $studio-gray-0; // Calypso --color-surface-backdrop
$menu-text: $studio-gray-80; // Calypso --color-sidebar-text
$menu-background: $studio-white; // Calypso --color-sidebar-background
$menu-highlight-text: $studio-gray-90; // Calypso --color-sidebar-menu-hover-text
$menu-highlight-icon: $menu-highlight-text;
$menu-highlight-icon: $studio-pink-30;
$menu-highlight-background: $studio-gray-5; // Calypso --color-sidebar-menu-hover-background
$menu-current-text: $studio-blue-70; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
$menu-current-background: $studio-blue-5; // Calypso --color-sidebar-menu-selected-background
$menu-submenu-text: $studio-blue-70; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-blue-0; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-pink-50; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-text: $studio-gray-10; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-blue-70; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-pink-30; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-pink-50; // Calypso --color-sidebar-submenu-selected-text
$adminbar-avatar-frame: $studio-blue-70;

// masterbar overrides
$masterbar-background: $studio-blue-60; // Calypso --color-masterbar-background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ $menu-current-text: #ffffff; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
$menu-current-background: #0073aa; // Calypso --color-sidebar-menu-selected-background
$menu-submenu-text: #b4b9be; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: #32373c; // Calypso --color-sidebar-submenu-background
$menu-submenu-background: #333; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: #00b9eb; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-white; // Calypso --color-sidebar-submenu-selected-text
$adminbar-avatar-frame: #333;

// masterbar overrides
$masterbar-background: $base-color; // Calypso --color-masterbar-background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $body-background: $studio-white; // Calypso --color-surface-backdrop
$menu-text: $studio-gray-90; // Calypso --color-sidebar-text
$menu-background: $studio-white; // Calypso --color-sidebar-background
$menu-highlight-text: $studio-white; // Calypso --color-sidebar-menu-hover-text
$menu-highlight-icon: $menu-highlight-text;
$menu-highlight-icon: $studio-yellow-20;
$menu-highlight-background: $studio-gray-60; // Calypso --color-sidebar-menu-hover-background
$menu-current-text: $studio-white; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
Expand All @@ -24,10 +24,11 @@ $menu-submenu-text: $studio-gray-10; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-gray-90; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-yellow-20; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-white; // Calypso --color-sidebar-submenu-selected-text
$adminbar-avatar-frame: $studio-gray-90;

// masterbar overrides
$masterbar-background: $base-color; // Calypso --color-masterbar-background
$masterbar-highlight-background: $studio-gray-80; // Calypso --color-masterbar-item-hover-background
$masterbar-highlight-background: $studio-gray-90; // Calypso --color-masterbar-item-hover-background
$masterbar-active-background: $studio-gray-60; // Calypso --color-masterbar-item-active-background

// nav unification overrides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ $body-background: $studio-gray-0; // Calypso --color-surface-backdrop
$menu-text: $studio-blue-5; // Calypso --color-sidebar-text
$menu-background: $studio-blue-80; // Calypso --color-sidebar-background
$menu-highlight-text: $studio-white; // Calypso --color-sidebar-menu-hover-text
$menu-highlight-icon: $menu-highlight-text;
$menu-highlight-icon: $studio-blue-20;
$menu-highlight-background: $studio-blue-70; // Calypso --color-sidebar-menu-hover-background
$menu-current-text: $studio-white; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
$menu-current-background: $studio-blue-100; // Calypso --color-sidebar-menu-selected-background
$menu-submenu-text: $studio-white; // Calypso --color-sidebar-submenu-text
$menu-submenu-text: $studio-gray-10; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-blue-90; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-blue-20; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-white; // Calypso --color-sidebar-submenu-text
$adminbar-avatar-frame: $studio-blue-100;

// masterbar overrides
$masterbar-background: $studio-blue-100; // Calypso --color-masterbar-background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ $body-background: $studio-gray-0; // Calypso --color-surface-backdrop
$menu-text: $studio-gray-80; // Calypso --color-sidebar-text
$menu-background: $studio-gray-5; // Calypso --color-sidebar-background
$menu-highlight-text: $studio-blue-60; // Calypso --color-sidebar-menu-hover-text
$menu-highlight-icon: $menu-highlight-text;
$menu-highlight-icon: $studio-blue-30;
$menu-highlight-background: $studio-white; // Calypso --color-sidebar-menu-hover-background
$menu-current-text: $studio-white; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
$menu-current-background: $studio-gray-60; // Calypso --color-sidebar-menu-selected-background
$menu-submenu-text: $studio-gray-80; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-gray-10; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-blue-60; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-text: $studio-gray-10; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-gray-80; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-blue-30; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-gray-80; // Calypso --color-sidebar-submenu-selected-text
$adminbar-avatar-frame: $studio-gray-90;

// masterbar overrides
$masterbar-background: $studio-gray-100; // Calypso --color-masterbar-background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ $body-background: $studio-gray-0; // Calypso --color-surface-backdrop
$menu-text: $studio-pink-80; // Calypso --color-sidebar-text
$menu-background: $studio-pink-5; // Calypso --color-sidebar-background
$menu-highlight-text: $studio-pink-90; // Calypso --color-sidebar-menu-hover-text
$menu-highlight-icon: $menu-highlight-text;
$menu-highlight-icon: $studio-blue-20;
$menu-highlight-background: $studio-pink-10; // Calypso --color-sidebar-menu-hover-background
$menu-current-text: $studio-white; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
$menu-current-icon: $studio-blue-20;
$menu-current-background: $studio-blue-50; // Calypso --color-sidebar-menu-selected-background
$menu-submenu-text: $studio-pink-0; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-pink-90; // Calypso --color-sidebar-submenu-background
$menu-submenu-text: $studio-gray-10; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-celadon-80; // Calypso --color-sidebar-submenu-background
$menu-submenu-background-alt: $studio-pink-70; // Calypso --color-sidebar-submenu-background-alt
$menu-submenu-focus-text: $studio-blue-20; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-pink-0; // Calypso --color-sidebar-submenu-selected-text
$adminbar-avatar-frame: $studio-celadon-80;

// masterbar overrides
$masterbar-background: $studio-celadon-70; // Calypso --color-masterbar-background
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
@import "variables";
@import "../admin";
@import "sidebar-notice";

#wpadminbar:not(.mobile) li:hover .ab-icon:before,
#wpadminbar:not(.mobile) li:hover .ab-item:before {
color: $menu-submenu-current-text;
}

#wpadminbar #wp-admin-bar-user-info .display-name {
color: $menu-submenu-text;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ $body-background: $studio-gray-0; // Calypso --color-surface-backdrop
$menu-text: $studio-white; // Calypso --color-sidebar-text
$menu-background: $studio-red-70; // Calypso --color-sidebar-background
$menu-highlight-text: $studio-white; // Calypso --color-sidebar-menu-hover-text
$menu-highlight-icon: $menu-highlight-text;
$menu-highlight-icon: $studio-yellow-20;
$menu-highlight-background: $studio-red-80; // Calypso --color-sidebar-menu-hover-background
$menu-current-text: $studio-yellow-80; // Calypso --color-sidebar-menu-selected-text
$menu-current-icon: $menu-current-text;
$menu-current-background: $studio-yellow-20; // Calypso --color-sidebar-menu-selected-background
$menu-submenu-text: $studio-white; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-red-60; // Calypso --color-sidebar-submenu-background
$menu-submenu-text: $studio-gray-10; // Calypso --color-sidebar-submenu-text
$menu-submenu-background: $studio-red-90; // Calypso --color-sidebar-submenu-background
$menu-submenu-focus-text: $studio-yellow-20; // Calypso --color-sidebar-submenu-hover-text
$menu-submenu-current-text: $studio-white; // Calypso --color-sidebar-submenu-selected-text
$adminbar-avatar-frame: $studio-red-80;

// masterbar overrides
$masterbar-background: $studio-red-80; // Calypso --color-masterbar-background
Expand All @@ -47,4 +48,3 @@ $menu-nudge-text-color: $studio-black;
$menu-nudge-cta-background: $highlight-color;
$menu-nudge-cta-color: $studio-white;
$menu-nudge-cta-background-hover: $studio-orange-60;

0 comments on commit 57aef23

Please sign in to comment.