Skip to content
Open
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
57 changes: 37 additions & 20 deletions src/wp-admin/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -1523,7 +1530,7 @@ div.error p,
padding: 0;
font-size: 13px;
line-height: 1.54;
color: #1e1e1e;
color: inherit;
}

div.notice a,
Expand Down Expand Up @@ -1557,7 +1564,7 @@ div.updated a:focus {

.notice-title {
display: inline-block;
color: #1d2327;
color: inherit;
font-size: 18px;
}

Expand All @@ -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;
Expand All @@ -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;
}

Expand All @@ -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 {
Expand Down
7 changes: 6 additions & 1 deletion src/wp-admin/css/customize-controls.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
40 changes: 32 additions & 8 deletions src/wp-admin/css/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions src/wp-admin/css/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
Loading