Repository navigation
Administration: Improve dashboard meta box control visuals #12339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,6 @@ | |
| outline-offset: -2px; | ||
| border-radius: 8px; | ||
| height: 250px; | ||
| margin: 4px; | ||
| } | ||
|
|
||
| /* Only highlight drop zones when dragging. */ | ||
|
|
@@ -82,7 +81,7 @@ | |
| } | ||
|
|
||
| .is-dragging-metaboxes #dashboard-widgets .postbox-container .empty-container { | ||
| background: rgba(0, 0, 0, 0.01); | ||
| background: rgba(var(--wp-admin-theme-color--rgb), 0.04); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good fix, as the other sortables already changed background color but the empty one.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It matches the fill the other columns already get while dragging, so all drop areas look the same. I'd prefer to keep them consistent. |
||
| } | ||
|
|
||
| #dashboard-widgets .postbox-container .empty-container::after { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please describe why this margin is removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
empty-containerclass is added to the.meta-box-sortableselement itself (seepostbox.js), and this rule is more specific, somargin: 4pxwas overriding that element's regularmargin: 0 8px 20px. That made empty drop areas wider than the widgets in the other columns. Removing it lets the empty areas line up with the widgets.