Make WordPress Core

Changeset 62955


Ignore:
Timestamp:
07/31/2026 12:18:25 PM (11 days ago)
Author:
tyxla
Message:

Media: Fix media modal positioning and spacing on mobile with infinite scroll.

On small screens, the attachment grid in the media modal collapsed to a single
narrow column when infinite scrolling was enabled. The responsive rules for
size and position of attachments grid, toolbar, and wrapper did not account for
the taller media toolbar present when the "load more" button is absent.

Add a .attachments-browser:not(.has-load-more) selector to the affected mobile
breakpoints and adjust the toolbar height and grid offset so the attachment grid
fills the modal width and displays multiple items per row, matching the layout
used when infinite scroll is disabled.

Props tyxla, mukesh27, joedolson.

See https://core.trac.wordpress.org/ticket/65564.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/css/media-views.css

    r62950 r62955  
    26362636
    26372637        .attachments-browser .attachments,
     2638        .attachments-browser:not(.has-load-more) .attachments,
    26382639        .attachments-browser .uploader-inline,
    26392640        .attachments-browser .media-toolbar,
     
    26442645
    26452646        .attachments-browser .media-toolbar {
    2646                 height: 74px;
     2647                height: 117px;
    26472648        }
    26482649
    26492650        .attachments-browser .attachments,
     2651        .attachments-browser:not(.has-load-more) .attachments,
    26502652        .attachments-browser .uploader-inline,
    26512653        .media-frame-content .attachments-browser .attachments-wrapper {
    2652                 top: 90px;
     2654                top: 131px;
    26532655        }
    26542656
     
    29572959
    29582960        .attachments-browser .attachments,
     2961        .attachments-browser:not(.has-load-more) .attachments,
    29592962        .attachments-browser .uploader-inline,
    29602963        .attachments-browser .media-toolbar,
Note: See TracChangeset for help on using the changeset viewer.