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
22 changes: 14 additions & 8 deletions src/wp-admin/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ img.emoji {
}

.stuffbox .hndle {
border-bottom: 1px solid #c3c4c7;
border-bottom: 1px solid rgb(0, 0, 0, 0.1);
}

.quicktags {
Expand Down Expand Up @@ -2156,7 +2156,7 @@ html.wp-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #c3c4c7;
border-bottom: 1px solid rgb(0, 0, 0, 0.1);
}

.postbox-header .hndle {
Expand All @@ -2169,6 +2169,7 @@ html.wp-toolbar {

.postbox-header .handle-actions {
flex-shrink: 0;
padding-inline-end: 6px;
}

/* Post box order and toggle buttons. */
Expand Down Expand Up @@ -2205,19 +2206,24 @@ html.wp-toolbar {
}

.sortable-placeholder {
border: 1px dashed #c3c4c7;
border: 2px solid var(--wp-admin-theme-color);
border-radius: 8px;
margin-bottom: 20px;
background: rgb(var(--wp-admin-theme-color--rgb), 0.04);
}

.postbox,
.stuffbox {
margin-bottom: 20px;
padding: 0;
line-height: 1;
background: #ffffff;
border: 1px solid rgb(0, 0, 0, 0.1);
border-radius: 0;
}

.postbox.closed {
border-bottom: 0;
.postbox.closed .postbox-header {
border-bottom: none;
}

/* user-select is not a part of the CSS standard - may change behavior in the future */
Expand All @@ -2228,7 +2234,7 @@ html.wp-toolbar {
}

.postbox .inside {
padding: 0 12px 12px;
padding: 16px;
line-height: 1.4;
font-size: 13px;
}
Expand All @@ -2241,7 +2247,7 @@ html.wp-toolbar {
}

.postbox .inside {
margin: 11px 0;
margin: 0;
position: relative;
}

Expand Down Expand Up @@ -2422,7 +2428,7 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
.metabox-holder h3.hndle, /* Back-compat for pre-4.4 */
.metabox-holder h2.hndle {
font-size: 14px;
padding: 8px 12px;
padding: 16px;
margin: 0;
line-height: 1.4;
}
Expand Down
54 changes: 39 additions & 15 deletions src/wp-admin/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@

#dashboard-widgets-wrap {
overflow: hidden;
margin: 0 -8px;
margin: 0 -4px;
}

#dashboard-widgets .postbox {
border-radius: 8px;
}

#dashboard-widgets .postbox-header .hndle {
padding: 12px 16px;
}

#dashboard-widgets .postbox .inside {
Expand All @@ -50,20 +58,32 @@
#dashboard-widgets .meta-box-sortables {
display: flow-root; /* avoid margin collapsing between parent and first/last child elements */
/* Required min-height to make the jQuery UI Sortable drop zone work. */
min-height: 100px;
margin: 0 8px 20px;
min-height: 0;
margin-right: 8px;
padding: 4px;
}

#dashboard-widgets .meta-box-sortables:not(:empty) {
margin-bottom: 16px;
}

#dashboard-widgets .postbox-container .empty-container {
outline: 3px dashed #c3c4c7;
outline: 2px dashed rgb(0, 0, 0, 0.15);
outline-offset: -2px;
border-radius: 8px;
height: 250px;
}

/* Only highlight drop zones when dragging and only in the 2 columns layout. */
/* Only highlight drop zones when dragging. */
.is-dragging-metaboxes #dashboard-widgets .meta-box-sortables {
outline: 3px dashed #646970;
/* Prevent margin on the child from collapsing with margin on the parent. */
display: flow-root;
border-radius: 8px;
background: rgb(var(--wp-admin-theme-color--rgb), 0.04);
min-height: 100px;
}

.is-dragging-metaboxes #dashboard-widgets .postbox-container .empty-container {
outline: 2px dashed rgb(0, 0, 0, 0.15);
background: rgb(0, 0, 0, 0.01);
}

#dashboard-widgets .postbox-container .empty-container:after {
Expand Down Expand Up @@ -121,6 +141,8 @@
overflow: auto;
margin: 16px 0;
background-color: #151515;
border: 1px solid rgb(0, 0, 0, 0.1);
border-radius: 8px;
font-size: 14px;
line-height: 1.3;
clear: both;
Expand Down Expand Up @@ -259,11 +281,11 @@
clear: both;
display: grid;
z-index: 1;
padding: 48px;
padding: 24px;
grid-template-columns: repeat(3, 1fr);
gap: 32px;
align-self: flex-end;
background: #fff;
background: #ffffff;
}

[class*="welcome-panel-icon"] {
Expand Down Expand Up @@ -704,7 +726,7 @@ body #dashboard-widgets .postbox form .submit {
}

#dashboard_right_now .main {
padding: 0 12px 11px;
padding: 16px 16px 11px;
}

#dashboard_right_now .main p {
Expand Down Expand Up @@ -892,7 +914,7 @@ body #dashboard-widgets .postbox form .submit {

#dashboard_activity .inside {
margin: 0;
padding-bottom: 0;
padding: 0 12px;
}

#dashboard_activity .no-activity {
Expand Down Expand Up @@ -1298,10 +1320,11 @@ a.rsswidget {

#dashboard-widgets #postbox-container-3 .empty-container,
#dashboard-widgets #postbox-container-4 .empty-container {
outline: none;
border: none;
height: 0;
min-height: 0;
margin-bottom: 0;
display: none;
}

#dashboard-widgets #postbox-container-3 .empty-container:after,
Expand All @@ -1314,7 +1337,7 @@ a.rsswidget {
}

#wpbody #dashboard-widgets .metabox-holder.columns-1 .postbox-container .empty-container {
outline: none;
border: none;
height: 0;
min-height: 0;
margin-bottom: 0;
Expand Down Expand Up @@ -1352,10 +1375,11 @@ a.rsswidget {
}

#dashboard-widgets #postbox-container-4 .empty-container {
outline: none;
border: none;
height: 0;
min-height: 0;
margin-bottom: 0;
display: none;
}

#dashboard-widgets #postbox-container-4 .empty-container:after {
Expand Down
13 changes: 9 additions & 4 deletions src/wp-admin/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#poststuff #post-body {
padding: 0;
margin: 0 -4px;
}

#poststuff .postbox-container {
Expand Down Expand Up @@ -167,11 +168,14 @@ body.post-type-wp_navigation .inline-edit-status {

/* Post Screen */

.metabox-holder .postbox-container .meta-box-sortables {
padding: 4px;
}

/* Only highlight drop zones when dragging and only in the 2 columns layout. */
.is-dragging-metaboxes .metabox-holder .postbox-container .meta-box-sortables {
outline: 3px dashed #646970;
/* Prevent margin on the child from collapsing with margin on the parent. */
display: flow-root;
border-radius: 8px;
background: rgb(var(--wp-admin-theme-color--rgb), 0.04);
/*
* This min-height is meant to limit jumpiness while dragging. It's equivalent
* to the minimum height of the sortable-placeholder which is given by the height
Expand Down Expand Up @@ -1770,7 +1774,8 @@ table.links-table {
}

.is-dragging-metaboxes.post-type-attachment #post-body .meta-box-sortables {
outline: none;
border: none;
background: transparent;
min-height: 0;
margin-bottom: 0;
}
Expand Down
8 changes: 4 additions & 4 deletions src/wp-admin/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -1047,12 +1047,12 @@ table.form-table td .updated p {
.card {
position: relative;
margin-top: 20px;
padding: 0.7em 2em 1em;
padding: 16px 24px;
min-width: 255px;
max-width: 520px;
border: 1px solid #c3c4c7;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
background: #fff;
border: 1px solid rgb(0, 0, 0, 0.1);
border-radius: 8px;
background: #ffffff;
box-sizing: border-box;
}

Expand Down
12 changes: 7 additions & 5 deletions src/wp-admin/css/list-tables.css
Original file line number Diff line number Diff line change
Expand Up @@ -1487,9 +1487,11 @@ ul.cat-checklist input[name="post_category[]"]:indeterminate::before {
margin: 0 8px 16px;
width: 48.5%;
width: calc( 50% - 8px );
background-color: #fff;
border: 1px solid #dcdcde;
background-color: #ffffff;
border: 1px solid rgb(0, 0, 0, 0.1);
border-radius: 8px;
box-sizing: border-box;
overflow: hidden;
}

.plugin-card:nth-child(odd) {
Expand Down Expand Up @@ -1553,7 +1555,7 @@ ul.cat-checklist input[name="post_category[]"]:indeterminate::before {

.plugin-card-top {
position: relative;
padding: 20px 20px 10px;
padding: 16px;
min-height: 135px;
}

Expand Down Expand Up @@ -1668,9 +1670,9 @@ div.action-links,

.plugin-card-bottom {
clear: both;
padding: 12px 20px;
padding: 16px;
background-color: #f6f7f7;
border-top: 1px solid #dcdcde;
border-top: 1px solid rgb(0, 0, 0, 0.1);
overflow: hidden;
}

Expand Down
18 changes: 10 additions & 8 deletions src/wp-admin/css/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ body.js .theme-browser.search-loading {
margin: 0 4% 4% 0;
position: relative;
width: 30.6%;
border: 1px solid #dcdcde;
box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1);
background: #ffffff;
border: 1px solid rgb(0, 0, 0, 0.1);
border-radius: 8px;
box-sizing: border-box;
overflow: hidden;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always look a little askance on overflow: hidden, as it can cause accessibility problems. I don't think it should here, since the class is removed when content is rendered, but can you tell me why it's being added?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .theme-browser .theme element is the main theme card. It has border-radius: 8px (line 69), which gives the card rounded corners. The .theme-screenshot child sits flush against the top of the card, and its img is absolutely positioned to fill the entire screenshot area.

Without overflow: hidden on the parent card, the screenshot image would visually "poke out" beyond the rounded corners at the top of the card, rendering with sharp square edges that ignore the parent's border-radius.

The card has no scrollable content, and no interactive or focusable elements that could end up clipped out of reach. The theme name area and action buttons all sit within the card's visible bounds.

}

.theme-browser .theme:nth-child(3n) {
Expand All @@ -83,13 +85,12 @@ body.js .theme-browser.search-loading {
font-weight: 600;
height: 18px;
margin: 0;
padding: 15px;
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
padding: 16px;
border-top: 1px solid rgb(0, 0, 0, 0.1);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
background: #fff;
background: rgba(255, 255, 255, 0.65);
background: #ffffff;
}

/* Activate and Customize buttons, shown on hover and focus */
Expand Down Expand Up @@ -271,8 +272,9 @@ body.js .theme-browser.search-loading {
* Add new theme
*/
.theme-browser .theme.add-new-theme {
background: transparent;
border: none;
box-shadow: none;
overflow: visible;
}

.theme-browser .theme.add-new-theme a {
Expand Down Expand Up @@ -348,8 +350,8 @@ body.js .theme-browser.search-loading {

.theme-browser .theme.add-new-theme .theme-name {
background: none;
border: none;
text-align: center;
box-shadow: none;
font-weight: 400;
position: relative;
top: 0;
Expand Down
Loading