From 323baeb032f6c21f3fd31f40ec1409b3de1e9cfe Mon Sep 17 00:00:00 2001 From: "Joen A." Date: Fri, 20 Nov 2026 14:07:57 +0100 Subject: [PATCH 1/2] Administration: Update notices to align with the WordPress Design System. See #64548. Co-Authored-By: Claude Opus 5.5 --- src/wp-admin/css/common.css | 57 ++++++++++++++++--------- src/wp-admin/css/customize-controls.css | 3 +- 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index 06ebb77c37658..c60fd7f26bbbb 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -1499,13 +1499,20 @@ th.action-links { 4.0 - Notifications ------------------------------------------------------------------------------*/ +/* + * Tone is carried by the surface, a full hairline border and the text colour. + * Padding, paragraph margins and the dismiss button's position are unchanged: + * plugins position their own elements against the inside of this box, so only + * its paint may change here. + */ .notice, div.updated, div.error { - background: #fff; - border: none; - border-left: 4px solid #c3c4c7; + background: #f3f3f3; + border: 1px solid #dbdbdb; + border-radius: 8px; box-shadow: none; + color: #1e1e1e; margin: 5px 15px 2px; padding: 8px 12px; } @@ -1523,7 +1530,7 @@ div.error p, padding: 0; font-size: 13px; line-height: 1.54; - color: #1e1e1e; + color: inherit; } div.notice a, @@ -1557,7 +1564,7 @@ div.updated a:focus { .notice-title { display: inline-block; - color: #1d2327; + color: inherit; font-size: 18px; } @@ -1574,7 +1581,8 @@ div.updated a:focus { margin: 0; padding: 0; background: none; - color: #1e1e1e; + /* Takes the notice's tone. */ + color: inherit; cursor: pointer; width: 24px; height: 24px; @@ -1584,9 +1592,14 @@ div.updated a:focus { border-radius: 2px; } +/* The glyph follows the button, so a plugin that colours the button colours the icon. */ +.notice-dismiss::before { + color: inherit; +} + .notice-dismiss:hover::before, .notice-dismiss:active::before { - color: #1e1e1e; + color: inherit; opacity: 0.7; } @@ -1597,47 +1610,51 @@ div.updated a:focus { } .notice-dismiss:focus::before { - color: #1e1e1e; + color: inherit; } .notice-success, div.updated { - border-left-color: #4ab866; - background-color: #eff9f1; + border-color: #91d29c; + background-color: #ebffed; + color: #002900; } .notice-success.notice-alt, div.updated.notice-alt { - background-color: #eff9f1; + background-color: #ebffed; } .notice-warning { - border-left-color: #f0b849; - background-color: #fef8ee; + border-color: #e0bc7d; + background-color: #fff7e1; + color: #2e1900; } .notice-warning.notice-alt { - background-color: #fef8ee; + background-color: #fff7e1; } .notice-error, div.error { - border-left-color: #cc1818; - background-color: #fcf0f0; + border-color: #e1b1a9; + background-color: #fff6f5; + color: #470000; } .notice-error.notice-alt, div.error.notice-alt { - background-color: #fcf0f0; + background-color: #fff6f5; } .notice-info { - border-left-color: #3858e9; - background-color: #fff; + border-color: #acc5e2; + background-color: #f3f9ff; + color: #001b4f; } .notice-info.notice-alt { - background-color: #fff; + background-color: #f3f9ff; } #plugin-information-footer .update-now:not(.button-disabled)::before { diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index b53baf94744de..d7f4417e879f5 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -1296,7 +1296,8 @@ p.customize-section-description { #customize-controls .notice.notification-overlay, #customize-controls #customize-notifications-area .notice.notification-overlay { margin: 0; - border-left: 0; /* @todo Appropriate styles could be added for notice-error, notice-warning, notice-success, etc */ + border: 0; /* @todo Appropriate styles could be added for notice-error, notice-warning, notice-success, etc */ + border-radius: 0; } #customize-controls .customize-control-notifications-container.has-overlay-notifications { From 8910fa85a84d0e34a32f212696de86a7dfae1b26 Mon Sep 17 00:00:00 2001 From: "Joen A." Date: Tue, 24 Nov 2026 11:46:34 +0100 Subject: [PATCH 2/2] Administration: Fix notices on the login screen, theme cards and in the Customizer. Checking the new notice in the places it appears turned up three contexts that the change had not reached. The login screen renders its messages through `wp_admin_notice()`, so its markup is already the admin's, but it does not load `common.css` and so kept the previous look: a 4px bar on one side, square corners and a white surface. `login.css` now repeats the notice paint, and messages take the tone their markup declares, so an instructional message is info-toned rather than carrying a brand-blue bar, and `notice-warning` and `notice-success` are styled there for the first time. Those values are duplicated from the notices section of `common.css` and have to be kept in step with it by hand. Theme cards and the Customizer's notification containers set `border-radius: 0`. A notice in either place is a band pinned to its container's edges rather than a box of its own: a theme card clips the band at the card's own corner radius, so a radius on the band only pulls it away from that corner, and the Customizer's notices measure the full width of their container and stack flush, so a radius turns the stack into a column of rounded pills. Padding and margins are unchanged throughout. See #66777. Co-Authored-By: Claude Opus 5 --- src/wp-admin/css/customize-controls.css | 4 +++ src/wp-admin/css/login.css | 40 ++++++++++++++++++++----- src/wp-admin/css/themes.css | 6 ++++ 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index d7f4417e879f5..231e8014bba63 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -1207,6 +1207,8 @@ p.customize-section-description { margin: 0 0 6px; padding: 9px 14px; overflow: hidden; + /* Notifications span the panel's full width, so they are bands rather than boxes. */ + border-radius: 0; } #customize-controls .customize-control-notifications-container .notice.is-dismissible { @@ -1269,6 +1271,8 @@ p.customize-section-description { #customize-controls .panel-meta > .customize-control-notifications-container .notice, #customize-controls .customize-section-title > .customize-control-notifications-container .notice { padding: 9px 14px; + /* Stacked flush against the panel's edges and each other, so no corners. */ + border-radius: 0; } #customize-controls #customize-notifications-area .notice.is-dismissible, diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css index 1489356612442..78e3713413fcd 100644 --- a/src/wp-admin/css/login.css +++ b/src/wp-admin/css/login.css @@ -39,15 +39,23 @@ p { line-height: 1.5; } +/* + * The login screen renders its messages through wp_admin_notice(), so the markup + * is the admin's. It does not load common.css, so the notice paint is repeated + * here, and the values below have to be kept in step with the notices section of + * that file by hand. Padding and margins are unchanged, so only the paint moves. + */ .login .message, .login .notice, .login .success { - border-left: 4px solid #3858e9; + background: #f3f3f3; + border: 1px solid #dbdbdb; + border-radius: 8px; + color: #1e1e1e; padding: 8px 12px; margin-top: 0; margin-left: 0; margin-bottom: 20px; - background-color: #fff; word-wrap: break-word; } @@ -59,15 +67,31 @@ p { margin: 0.5em 0; } -.login .success { - border-left-color: #4ab866; - background-color: #eff9f1; +/* An instructional message is rendered as an info notice, so it takes that tone. */ +.login .message, +.login .notice-info { + border-color: #acc5e2; + background-color: #f3f9ff; + color: #001b4f; +} + +.login .success, +.login .notice-success { + border-color: #91d29c; + background-color: #ebffed; + color: #002900; +} + +.login .notice-warning { + border-color: #e0bc7d; + background-color: #fff7e1; + color: #2e1900; } -/* Match border color from common.css */ .login .notice-error { - border-left-color: #cc1818; - background-color: #fcf0f0; + border-color: #e1b1a9; + background-color: #fff6f5; + color: #470000; } .login .login-error-list { diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index 2c59593f4392b..be9e12ec27b07 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -46,6 +46,12 @@ body.js .theme-browser.search-loading { position: absolute; right: 0; top: 0; + /* + * The message is a band pinned to the card's edges, not a box of its own. + * The card already clips it to the card's own corner radius, so a radius + * here would only pull the band away from that corner. + */ + border-radius: 0; } /**