Media Library styling broken

Created on 18 September 2024, 9 months ago

Problem/Motivation

There are numerous problems with the CSS introduced in #3249388: Styling update β†’ for media library.

A lot of the styles do not apply because the class media-library-item--grid is missing from the media browser view. This results in a broken UI.

Media widgets

.media-library-item__edit, .media-library-item__remove positions the button using absolute which causes the button to disappear into the upper right page corner effectively making it impossible to remove or edit media items.

Media library

In my environment the styles under .view-media-library do not apply at all to the media library either at /admin/content/media-grid, layout builder, or ckeditor embed media button. I do not know why. The selectors are valid. I can target those selectors in a separate css file and they work.
If I install media_library_theme_reset then suddenly the styles from media_library.scss-> .view-media-library do apply (and then get overridden). I cannot figure out what that module is doing to cause the media library css from the bootstrap theme to take effect in the above locations.

.views-field-rendered-entity is assigned both card and card body styles which is invalid. The containing element .media-library-item--grid should have the card styles. The .views-field-media-library-select-form has card header styles which won't apply because of the missing card styles on the containing element.

Proposed resolution

Add the needed templates so media-library-item--grid is present in the media library view.

πŸ› Bug report
Status

Active

Version

4.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States rhovland Oregon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024