Move Media Library styles into the Seven theme

Created on 20 June 2018, over 6 years ago
Updated 2 April 2024, 9 months ago

Problem/Motivation

The file media_library.theme.css should not be in the Media Library module, but in the theme layer.

Proposed resolution

  1. move media_library.theme.css to core/themes/seven/css/theme/media-library.css (changing underscores to dashes to match naming conventions of other CSS files in the theme)
  2. Any css rules added to media_library.theme.css in #3038489: Add a Media library views template to Seven theme to add wrapper around the grid rows β†’ should be present in the new media_library.theme.css
  3. Move all of media_library.module.css into the new media-library.css, making a point to consolidate when the same selectors are used. The rules that should remain in media_library.module.css are the most purely "functional" stuff -- the rules without which the media library cannot be used at all, or specific functionality breaks. Basically,iIf the media library can be used in Stark without a particular rule, no matter how ugly it may look, that rule belongs in media_library.theme.css, in Seven.
  4. Add this to seven.libraries.yml:
    media_library:
      version: VERSION
      css:
        theme:
          css/theme/media-library.css: {}
    
  5. In media_library.libraries.yml
    Remove the last two lines of the style library.
    style:
      version: VERSION
      css:
        component:
          css/media_library.module.css: {}
    #remove    theme: 
    #remove      css/media_library.theme.css: {}
    
  6. In seven.info.yml, add this to libraries-extend:
    media_library/style:
      -seven/media_library
    

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Change record β†’
This issue is a placeholder for the @todo added in #2962110: Add the Media Library module to Drupal core β†’ .

πŸ“Œ Task
Status

Closed: duplicate

Version

8.9 ⚰️

Component
MediaΒ  β†’

Last updated about 14 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States samuel.mortenson

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    I found this while reviewing change records. I think this should be set as a duplicate and credit transferred to the other issue, [#13305411].

    I checked credit and the people working here are already credited on the other issue.

Production build 0.71.5 2024