Revert the improvenents to arranging of postboxes/metaboxes, [49179]. The current patch fixes about half a dozen problems, but seems more general improvements are needed to how Screen Options work.

See #50699.

git-svn-id: https://develop.svn.wordpress.org/trunk@49325 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2020-10-27 10:45:36 +00:00
parent dda3adec97
commit 1a0a55df8c
6 changed files with 197 additions and 240 deletions

View File

@@ -1986,7 +1986,7 @@ html.wp-toolbar {
padding-top: 10px;
}
.postbox-container .meta-box-sortables {
.metabox-holder .postbox-container .meta-box-sortables {
/* The jQuery UI Sortables need some initial height to work properly. */
min-height: 1px;
position: relative;
@@ -2015,14 +2015,10 @@ html.wp-toolbar {
height: 0;
min-height: 0;
}
#wpbody-content .metabox-holder .postbox-container .empty-container:after {
display: none;
}
}
.js .widget .widget-top,
.js.screen-options-open .postbox .hndle {
.js .postbox .hndle {
cursor: move;
}

View File

@@ -49,20 +49,24 @@
#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;
}
/* The following four selectors also apply on the Edit Post screen. */
.screen-options-open .meta-box-sortables {
#dashboard-widgets .postbox-container .empty-container {
outline: 3px dashed #b4b9be;
height: 250px;
}
/* Only highlight drop zones when dragging and only in the 2 columns layout. */
.is-dragging-metaboxes #dashboard-widgets .meta-box-sortables {
outline: 3px dashed #606a73;
min-height: 250px;
/* Prevent margin on the child from collapsing with margin on the parent. */
display: flow-root;
}
.screen-options-open .postbox-container .empty-container {
outline-color: #b4b9be;
}
.postbox-container .empty-container:after {
#dashboard-widgets .postbox-container .empty-container:after {
content: attr(data-emptystring);
margin: auto;
position: absolute;
@@ -78,9 +82,6 @@
display: none;
}
.screen-options-open .postbox-container .empty-container:after {
display: block;
}
/* @todo: this was originally in this section, but likely belongs elsewhere */
#the-comment-list td.comment p.comment-author {
@@ -1117,7 +1118,7 @@ a.rsswidget {
min-height: 0;
}
.screen-options-open #dashboard-widgets .meta-box-sortables {
.is-dragging-metaboxes #dashboard-widgets .meta-box-sortables {
min-height: 100px;
}
@@ -1173,11 +1174,10 @@ a.rsswidget {
.columns-prefs .columns-prefs-4 {
display: none;
}
/*
#dashboard-widgets .postbox-container .empty-container:after {
display: block;
}
*/
}
/* three columns on the dash */
@@ -1205,20 +1205,19 @@ a.rsswidget {
#dashboard-widgets #postbox-container-4 .empty-container:after {
display: none;
}
/*
#dashboard-widgets .postbox-container .empty-container:after {
display: block;
}
*/
}
/* Always show the "Drag boxes here" CSS generated content on large screens.
/* Always show the "Drag boxes here" CSS generated content on large screens. */
@media only screen and (min-width: 1801px) {
#dashboard-widgets .postbox-container .empty-container:after {
display: block;
}
}
*/
@media screen and (max-width: 870px) {
.welcome-panel .welcome-panel-column,
.welcome-panel .welcome-panel-column:first-child {

View File

@@ -148,20 +148,21 @@ body.post-new-php .submitbox .submitdelete {
/* Post Screen */
.screen-options-open .metabox-holder .postbox-container .meta-box-sortables {
/* 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 #606a73;
/* Prevent margin on the child from collapsing with margin on the parent. */
display: flow-root;
/*
* 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
* of a collapsed post box (36px + 1px top and bottom borders) + the placeholder
* bottom margin (20px) + 2 additional pixels to compensate browsers rounding.
*/
min-height: 60px;
margin-bottom: 20px;
}
.screen-options-open #postbox-container-2 #advanced-sortables.empty-container {
height: 0;
min-height: 0;
outline: none;
}
.screen-options-open #postbox-container-2 #advanced-sortables.empty-container:after {
display: none;
}
.postbox {
position: relative;
min-width: 255px;
@@ -1522,7 +1523,7 @@ table.links-table {
width: auto;
}
.screen-options-open.post-type-attachment #post-body .meta-box-sortables {
.is-dragging-metaboxes.post-type-attachment #post-body .meta-box-sortables {
outline: none;
min-height: 0;
margin-bottom: 0;
@@ -1562,10 +1563,10 @@ table.links-table {
}
/* Increase min-height while dragging for the #side-sortables and any potential sortables area with custom ID. */
.screen-options-open #poststuff #postbox-container-1 .empty-container,
.screen-options-open #poststuff #postbox-container-1 #side-sortables:empty,
.screen-options-open #poststuff #post-body.columns-2 #side-sortables,
.screen-options-open #poststuff #post-body.columns-2 .meta-box-sortables {
.is-dragging-metaboxes #poststuff #postbox-container-1 .empty-container,
.is-dragging-metaboxes #poststuff #postbox-container-1 #side-sortables:empty,
.is-dragging-metaboxes #poststuff #post-body.columns-2 #side-sortables,
.is-dragging-metaboxes #poststuff #post-body.columns-2 .meta-box-sortables {
height: auto;
min-height: 60px;
}