From 73dc1a085403a4a4c9ba3b004021d0496d0bb1f9 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 2 Jul 2020 14:53:37 +0000 Subject: [PATCH] Color schemes: Add new modern color scheme option. This PR adds a new color scheme option, which uses a high luminosity blue spot color, almost-black menu, and pure white for menu items. This helps increase contrast, and bring more consistency with some of the higher contrast colors used in the block editor. Props joen, ibdz, shaunandrews. Fixes #50504. git-svn-id: https://develop.svn.wordpress.org/trunk@48277 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/colors/modern/colors.scss | 14 ++++++++++++++ src/wp-admin/includes/misc.php | 1 + src/wp-includes/general-template.php | 12 ++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 src/wp-admin/css/colors/modern/colors.scss diff --git a/src/wp-admin/css/colors/modern/colors.scss b/src/wp-admin/css/colors/modern/colors.scss new file mode 100644 index 0000000000..1c6423520b --- /dev/null +++ b/src/wp-admin/css/colors/modern/colors.scss @@ -0,0 +1,14 @@ +$base-color: #1e1e1e; +$highlight-color: #3858e9; +$menu-submenu-focus-text: #33f078; +$notification-color: $highlight-color; + +$link: $highlight-color; +$link-focus: darken($highlight-color, 10%); + + +@import "../_admin.scss"; + +#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + padding-bottom: 12px; +} diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index 6e8915b6bd..bee524cb50 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -934,6 +934,7 @@ function admin_color_scheme_picker( $user_id ) { array( 'fresh' => '', 'light' => '', + 'modern' => '', ), $_wp_admin_css_colors ) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 4ca99c9eec..46e585df12 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -4366,6 +4366,18 @@ function register_admin_color_schemes() { ) ); + wp_admin_css_color( + 'modern', + _x( 'Modern', 'admin color scheme' ), + admin_url( "css/colors/modern/colors$suffix.css" ), + array( '#1e1e1e', '#3858e9', '#e26f56' ), + array( + 'base' => '#1e1e1e', + 'focus' => '#3858e9', + 'current' => '#e26f56', + ) + ); + wp_admin_css_color( 'blue', _x( 'Blue', 'admin color scheme' ),