From c5a7371545b019cb6ae6c73576c5c30a0aceca5f Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Sun, 25 Jun 2023 21:11:51 +0000 Subject: [PATCH] Administration: Fix visual regression in media search input. Follow up to [r56023]. Improve handling of breakpoint between 782 and 1000px for media grid view & repair styles for media modal search input. Props kebbet, joedolson. Fixes #57949. git-svn-id: https://develop.svn.wordpress.org/trunk@56026 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/media.css | 22 +++++++++++++++++++++- src/wp-includes/css/media-views.css | 12 ++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index 5e604adbc5..45a7a4e7e5 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -583,6 +583,16 @@ border color while dragging a file over the uploader drop area */ margin-top: 0; } +.media-frame-content .media-search-input-label { + margin: 0 .2em 0 0; + vertical-align: baseline; +} + +.media-frame.mode-grid .media-search-input-label { + position: static; + margin: 0 .5em 0 0; +} + .attachments-browser .media-toolbar-secondary > .media-button { margin-right: 10px; } @@ -1334,7 +1344,6 @@ audio, video { /** * Media queries for media grid. */ - @media only screen and (max-width: 1120px) { /* override for media-views.css */ #wp-media-grid .wp-filter .attachment-filters { @@ -1342,6 +1351,17 @@ audio, video { } } +@media only screen and (max-width: 1000px) { + /* override for forms.css */ + .wp-filter p.search-box { + float: none; + width: 100%; + margin-bottom: 20px; + display: flex; + } + +} + @media only screen and (max-width: 782px) { .media-frame.mode-select .attachments-browser.fixed .media-toolbar { top: 46px; diff --git a/src/wp-includes/css/media-views.css b/src/wp-includes/css/media-views.css index e786d9c9b8..977ab93fe2 100644 --- a/src/wp-includes/css/media-views.css +++ b/src/wp-includes/css/media-views.css @@ -281,10 +281,6 @@ width: calc(48% - 12px); } -.media-modal-content .attachments-browser .search { - width: 100%; -} - /* higher specificity */ .wp-core-ui .media-modal-icon { background-image: url(../images/uploader-icons.png); @@ -924,6 +920,14 @@ max-width: 100%; } +.media-modal .media-frame .media-search-input-label { + position: absolute; + left: 0; + top: 10px; + margin: 0; + line-height: 1; +} + /** * Attachments */