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..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, @@ -1296,7 +1300,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 { 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; } /**