Skip to content

Commit e1f1f58

Browse files
committed
Media: Fix filter toolbar spinner alignment.
The spinner that appeared during filtering was positioned beneath the fields, causing a scrollbar in the filter wrapper container. While only visible during scrolling on MacOS, it was persistently visible on Windows. Fixes the alignment of the toolbar to appear with predictable alignment to the select fields without generating a scrollbar. Follow up to [61757]. Props luismulinari, yogeshbhutkar, dhruvang21, r1k0, sabernhardt, wildworks, audrasjb, joedolson. Fixes #65275. See #23562. git-svn-id: https://develop.svn.wordpress.org/trunk@62480 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 095fab5 commit e1f1f58

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

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

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@
340340
.media-toolbar-secondary {
341341
float: left;
342342
height: 100%;
343+
position: relative;
343344
display: grid;
344345
grid-template-columns: repeat( 2, 1fr );
345346
grid-template-rows: repeat( 2, 1fr );
@@ -364,6 +365,13 @@ select#media-attachment-date-filters {
364365
grid-area: 2 / 2 / 3 / 3;
365366
}
366367

368+
.media-toolbar-secondary > .spinner {
369+
position: absolute;
370+
left: calc( 100% + 2px );
371+
top: 50%;
372+
margin: 0;
373+
}
374+
367375
.media-toolbar-primary > .media-button,
368376
.media-toolbar-primary > .media-button-group {
369377
margin-left: 10px;
@@ -1286,7 +1294,7 @@ select#media-attachment-date-filters {
12861294
}
12871295

12881296
.attachments-browser .media-toolbar-primary {
1289-
max-width: 33%;
1297+
max-width: calc( 33% - 20px );
12901298
}
12911299

12921300
.mode-grid .attachments-browser .media-toolbar-primary {
@@ -1820,12 +1828,6 @@ select#media-attachment-date-filters {
18201828
vertical-align: middle;
18211829
}
18221830

1823-
.media-modal .media-toolbar .spinner {
1824-
float: none;
1825-
vertical-align: bottom;
1826-
margin: 0 0 5px 5px;
1827-
}
1828-
18291831
.media-frame .instructions + .spinner.is-active {
18301832
vertical-align: middle;
18311833
}
@@ -2835,6 +2837,10 @@ select#media-attachment-date-filters {
28352837
float: right;
28362838
}
28372839

2840+
.media-frame .media-toolbar-secondary .spinner {
2841+
top: calc( 50% - 8px );
2842+
}
2843+
28382844
.media-modal .attachments-browser .media-toolbar .attachment-filters {
28392845
height: auto;
28402846
}
@@ -2855,10 +2861,6 @@ select#media-attachment-date-filters {
28552861
.media-frame .media-toolbar input[type="search"] {
28562862
line-height: 2.3755; /* 38px */
28572863
}
2858-
2859-
.media-modal .media-toolbar .spinner {
2860-
margin-bottom: 10px;
2861-
}
28622864
}
28632865

28642866
@media screen and (max-width: 782px) {
@@ -2870,6 +2872,10 @@ select#media-attachment-date-filters {
28702872
bottom: -60px;
28712873
}
28722874

2875+
.media-frame .media-toolbar-secondary .spinner {
2876+
top: 0;
2877+
}
2878+
28732879
.mode-grid .attachments-browser .media-toolbar-primary {
28742880
display: grid;
28752881
grid-template-columns: auto 1fr;
@@ -2894,7 +2900,7 @@ select#media-attachment-date-filters {
28942900
top: 0;
28952901
bottom: 0;
28962902
margin: auto;
2897-
left: 0;
2903+
left: calc( 100% + 2px );
28982904
right: 0;
28992905
z-index: 9;
29002906
}

0 commit comments

Comments
 (0)