Skip to content

Commit 135599d

Browse files
committed
Media: Use the default 40px button height in the media modal.
Buttons in the media modal and attachment detail modal defaulted to a 32px height via CSS overrides, while form elements such as input and select use the default 40px. Remove these overrides so buttons fall back to the default 40px height, resolving the size inconsistencies. Props cbravobernal, huzaifaalmesbah, khokansardar, masteradhoc, muryam, noruzzaman, tusharaddweb, wildworks. Fixes #65428. git-svn-id: https://develop.svn.wordpress.org/trunk@62587 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5eecf16 commit 135599d

2 files changed

Lines changed: 13 additions & 26 deletions

File tree

src/wp-admin/css/media.css

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ border color while dragging a file over the uploader drop area */
781781
margin: 0 auto 16px;
782782
max-width: 100%;
783783
max-height: 90%;
784-
max-height: calc( 100% - 42px ); /* leave space for actions underneath */
784+
max-height: calc( 100% - 56px ); /* leave space for actions underneath */
785785
background-image: linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7), linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7);
786786
background-position: 0 0, 10px 10px;
787787
background-size: 20px 20px;
@@ -795,12 +795,6 @@ border color while dragging a file over the uploader drop area */
795795
text-align: center;
796796
}
797797

798-
.edit-attachment-frame .button {
799-
min-height: 32px;
800-
line-height: 2.30769231; /* 30px for 32px height with 13px font */
801-
padding: 0 12px;
802-
}
803-
804798
.edit-attachment-frame .wp-media-wrapper {
805799
margin-bottom: 12px;
806800
}

src/wp-includes/css/media-views.css

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
.media-modal label {
2727
font-size: 13px;
28-
}
28+
}
2929

3030
.media-modal .legend-inline {
3131
position: absolute;
@@ -272,13 +272,6 @@
272272
-webkit-font-smoothing: subpixel-antialiased;
273273
}
274274

275-
.media-modal-content .button,
276-
.media-modal-content .button.button-large {
277-
min-height: 32px;
278-
line-height: 2.30769231; /* 30px for 32px height with 13px font */
279-
padding: 0 12px;
280-
}
281-
282275
.media-toolbar input[type="text"],
283276
.media-toolbar input[type="search"],
284277
.media-toolbar select {
@@ -327,8 +320,8 @@
327320

328321
.media-frame-toolbar .media-toolbar-primary > .media-button,
329322
.media-frame-toolbar .media-toolbar-primary > .media-button-group {
330-
margin-top: 14px;
331-
margin-bottom: 14px;
323+
margin-top: 10px;
324+
margin-bottom: 10px;
332325
}
333326

334327
.media-toolbar-primary {
@@ -349,21 +342,21 @@
349342
align-items: end;
350343
}
351344

352-
label[for="media-attachment-filters"] {
353-
grid-area: 1 / 1 / 2 / 2;
345+
label[for="media-attachment-filters"] {
346+
grid-area: 1 / 1 / 2 / 2;
354347
}
355348

356-
select#media-attachment-filters {
357-
grid-area: 2 / 1 / 3 / 2;
349+
select#media-attachment-filters {
350+
grid-area: 2 / 1 / 3 / 2;
358351
}
359352

360-
label[for="media-attachment-date-filters"] {
361-
grid-area: 1 / 2 / 2 / 3;
353+
label[for="media-attachment-date-filters"] {
354+
grid-area: 1 / 2 / 2 / 3;
362355
}
363356

364-
select#media-attachment-date-filters {
365-
grid-area: 2 / 2 / 3 / 3;
366-
}
357+
select#media-attachment-date-filters {
358+
grid-area: 2 / 2 / 3 / 3;
359+
}
367360

368361
.media-toolbar-secondary > .spinner {
369362
position: absolute;

0 commit comments

Comments
 (0)