Admin: Apply scheme styles in non-admin admin screens.

Adds the admin-scheme styles as a dependency for the login and install styles. This is to ensure the CSS variables are available to the login, installation, database repair and upgrade screens.

Modifies the display of notices in the login styles to match those in the new default scheme, "modern".

Props peterwilsoncc, wildworks, westonruter, mukesh27, fabiankaegy, audrasjb, huzaifaalmesbah, sabernhardt, presskopp, SirLouen, ellatrix, nendeb55, neo2k23, jsmansart, joedolson.
Fixes #64640, #64548. See #64308.
Built from https://develop.svn.wordpress.org/trunk@61681


git-svn-id: http://core.svn.wordpress.org/trunk@60989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson
2026-02-18 21:14:48 +00:00
parent ec44501020
commit b9dd8f612b
13 changed files with 53 additions and 43 deletions
+20 -16
View File
@@ -16,7 +16,7 @@ body {
}
a {
color: #2271b1;
color: var(--wp-admin-theme-color-darker-10);
transition-property: border, background, color;
transition-duration: .05s;
transition-timing-function: ease-in-out;
@@ -28,7 +28,7 @@ a {
a:hover,
a:active {
color: #135e96;
color: var(--wp-admin-theme-color-darker-20);
}
a:focus {
@@ -45,22 +45,32 @@ p {
.login .message,
.login .notice,
.login .success {
border-right: 4px solid #72aee6;
padding: 12px;
border-right: 4px solid #3858e9;
padding: 8px 12px;
margin-top: 0;
margin-right: 0;
margin-bottom: 20px;
background-color: #fff;
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
background-color: transparent;
word-wrap: break-word;
}
.login .message p,
.login .notice p,
.login .success p {
font-size: 13px;
line-height: 1.54;
margin: 0.5em 0;
}
.login .success {
border-right-color: #00a32a;
border-right-color: #4ab866;
background-color: #eff9f1;
}
/* Match border color from common.css */
.login .notice-error {
border-right-color: #d63638;
border-right-color: #cc1818;
background-color: #fcf0f0;
}
.login .login-error-list {
@@ -114,8 +124,8 @@ p {
.login .button.wp-hide-pw:focus {
background: transparent;
border-color: #3582c4;
box-shadow: 0 0 0 1px #3582c4;
border-color: var(--wp-admin-theme-color);
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
}
@@ -361,12 +371,6 @@ p {
padding-right: 2.5rem;
}
.login form .input,
.login input[type="text"],
.login form input[type="checkbox"] {
background: #fff;
}
.js.login-action-resetpass input[type="text"],
.js.login-action-resetpass input[type="password"],
.js.login-action-rp input[type="text"],
+1 -1
View File
File diff suppressed because one or more lines are too long
+20 -16
View File
@@ -15,7 +15,7 @@ body {
}
a {
color: #2271b1;
color: var(--wp-admin-theme-color-darker-10);
transition-property: border, background, color;
transition-duration: .05s;
transition-timing-function: ease-in-out;
@@ -27,7 +27,7 @@ a {
a:hover,
a:active {
color: #135e96;
color: var(--wp-admin-theme-color-darker-20);
}
a:focus {
@@ -44,22 +44,32 @@ p {
.login .message,
.login .notice,
.login .success {
border-left: 4px solid #72aee6;
padding: 12px;
border-left: 4px solid #3858e9;
padding: 8px 12px;
margin-top: 0;
margin-left: 0;
margin-bottom: 20px;
background-color: #fff;
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
background-color: transparent;
word-wrap: break-word;
}
.login .message p,
.login .notice p,
.login .success p {
font-size: 13px;
line-height: 1.54;
margin: 0.5em 0;
}
.login .success {
border-left-color: #00a32a;
border-left-color: #4ab866;
background-color: #eff9f1;
}
/* Match border color from common.css */
.login .notice-error {
border-left-color: #d63638;
border-left-color: #cc1818;
background-color: #fcf0f0;
}
.login .login-error-list {
@@ -113,8 +123,8 @@ p {
.login .button.wp-hide-pw:focus {
background: transparent;
border-color: #3582c4;
box-shadow: 0 0 0 1px #3582c4;
border-color: var(--wp-admin-theme-color);
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
}
@@ -360,12 +370,6 @@ p {
padding-right: 2.5rem;
}
.login form .input,
.login input[type="text"],
.login form input[type="checkbox"] {
background: #fff;
}
.js.login-action-resetpass input[type="text"],
.js.login-action-resetpass input[type="password"],
.js.login-action-rp input[type="text"],
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -611,7 +611,7 @@ function wp_iframe( $content_func, ...$args ) {
?>
</head>
<body<?php echo $body_id_attr; ?> class="wp-core-ui no-js">
<body<?php echo $body_id_attr; ?> class="wp-core-ui no-js <?php echo 'admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'modern' ); ?>">
<script>
document.body.className = document.body.className.replace('no-js', 'js');
</script>
+1
View File
@@ -2172,6 +2172,7 @@ var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?
do_action( 'admin_head' );
$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'modern' );
if ( is_rtl() ) {
$admin_body_class .= ' rtl';
+2 -2
View File
@@ -15,7 +15,7 @@ if ( false ) {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Error: PHP is not running</title>
</head>
<body class="wp-core-ui">
<body class="wp-core-ui admin-color-modern">
<h1>Error: PHP is not running</h1>
<p>WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
</body>
@@ -72,7 +72,7 @@ function display_header( $body_classes = '' ) {
<title><?php _e( 'WordPress &rsaquo; Installation' ); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body class="wp-core-ui<?php echo $body_classes; ?>">
<body class="wp-core-ui admin-color-modern<?php echo $body_classes; ?>">
<p id="logo"><?php _e( 'WordPress' ); ?></p>
<?php
+1 -1
View File
@@ -20,7 +20,7 @@ header( 'Content-Type: text/html; charset=utf-8' );
<title><?php _e( 'WordPress &rsaquo; Database Repair' ); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body class="wp-core-ui">
<body class="wp-core-ui admin-color-modern">
<p id="logo"><?php _e( 'WordPress' ); ?></p>
<?php
+1
View File
@@ -94,6 +94,7 @@ $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1;
function setup_config_display_header( $body_classes = array() ) {
$body_classes = (array) $body_classes;
$body_classes[] = 'wp-core-ui';
$body_classes[] = 'admin-color-modern';
$dir_attr = '';
if ( is_rtl() ) {
$body_classes[] = 'rtl';
+1 -1
View File
@@ -80,7 +80,7 @@ header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option
<title><?php _e( 'WordPress &rsaquo; Update' ); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body class="wp-core-ui">
<body class="wp-core-ui admin-color-modern">
<p id="logo"><?php _e( 'WordPress' ); ?></p>
<?php if ( (int) get_option( 'db_version' ) === $wp_db_version || ! is_blog_installed() ) : ?>
+2 -2
View File
@@ -1633,8 +1633,8 @@ function wp_default_styles( $styles ) {
$styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n', 'wp-base-styles' ) );
$styles->add( 'login', "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
$styles->add( 'login', "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n', 'wp-base-styles' ) );
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n', 'wp-base-styles' ) );
$styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" );
$styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'imgareaselect' ) );
$styles->add( 'customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
+1 -1
View File
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-alpha-61680';
$wp_version = '7.0-alpha-61681';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
+1 -1
View File
@@ -166,7 +166,7 @@ function login_header( $title = null, $message = '', $wp_error = null ) {
*/
$login_header_text = apply_filters( 'login_headertext', $login_header_text );
$classes = array( 'login-action-' . $action, 'wp-core-ui' );
$classes = array( 'login-action-' . $action, 'wp-core-ui', 'admin-color-modern' );
if ( is_rtl() ) {
$classes[] = 'rtl';