Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/experimental/pages/site-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function gutenberg_site_editor_enable_admin_bar() {

$admin_color = get_user_option( 'admin_color' );
if ( empty( $admin_color ) ) {
$admin_color = 'fresh';
$admin_color = 'modern';
}
$admin_color_class = 'admin-color-' . sanitize_html_class( $admin_color );

Expand Down
8 changes: 4 additions & 4 deletions packages/admin-ui/src/admin-theme-colors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ type AdminThemeColors = {

const DEFAULT_THEME_COLORS: AdminThemeColors = {
primary: '#3858e9',
background: '#25292b',
background: '#222524',
};

const ADMIN_THEME_COLORS = new Map< string, AdminThemeColors >( [
[ 'fresh', DEFAULT_THEME_COLORS ],
[ 'modern', { primary: '#3858e9', background: '#222524' } ],
[ 'modern', DEFAULT_THEME_COLORS ],
[ 'fresh', { primary: '#3858e9', background: '#25292b' } ],
[ 'midnight', { primary: '#cf4339', background: '#3d4042' } ],
[ 'coffee', { primary: '#916745', background: '#5b534d' } ],
[ 'ocean', { primary: '#567958', background: '#5f787f' } ],
Expand All @@ -31,7 +31,7 @@ const ADMIN_THEME_COLORS = new Map< string, AdminThemeColors >( [
export function getAdminThemeColors(): AdminThemeColors {
const scheme =
document.body.className.match( /admin-color-([\w-]+)/ )?.[ 1 ] ??
'fresh';
'modern';

return ADMIN_THEME_COLORS.get( scheme ) ?? DEFAULT_THEME_COLORS;
}
6 changes: 3 additions & 3 deletions packages/admin-ui/src/admin-theme-colors/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ describe( 'getAdminThemeColors', () => {
} );
} );

it( 'should fall back to the fresh scheme colors when no admin-color class is present', () => {
it( 'should fall back to the modern scheme colors when no admin-color class is present', () => {
document.body.className = 'foo bar';

expect( getAdminThemeColors() ).toEqual( {
primary: '#3858e9',
background: '#25292b',
background: '#222524',
} );
} );

Expand All @@ -27,7 +27,7 @@ describe( 'getAdminThemeColors', () => {

expect( getAdminThemeColors() ).toEqual( {
primary: '#3858e9',
background: '#25292b',
background: '#222524',
} );
} );
} );
Loading