libraries-override paths needs to be changed if they are base vs subtheme

Created on 21 November 2016, almost 8 years ago
Updated 21 September 2024, about 1 month ago

Problem/Motivation

The path logic is painful when using sub themes to overwriting libraries.

Lets say we have 2 themes : base and subtheme
If I want to remove the toolbar.theme.css in my basetheme (base) and i set my active theme set to "subtheme"

name: base
type: theme
base theme: classy

libraries-override:
  toolbar/toolbar:
    css:
      theme:
        css/toolbar.theme.css: false

subtheme:

name: subtheme
type: theme
base theme: base
core: '8.x'

Oki so that works fine toolbar.theme.css is removed when i use my subtheme, and it "inherits" the removing of toolbar.theme.css

But if I wanna do the same with a the theme that do not uses a subtheme i have to change the paths

name: basedrop
type: theme
base theme: stable # or classy
core: '8.x'

libraries-override:
  toolbar/toolbar:
    css:
      theme:
        /core/themes/stable/css/toolbar/toolbar.theme.css: false

The path for toolbar.theme.css have to be set to now to /core/themes/stable/css/toolbar/toolbar.theme.css instead of css/toolbar.theme.css: false thats kinda confusing

Proposed resolution

make paths for overwriting core allways be the same path

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: duplicate

Version

11.0 🔥

Component
Theme 

Last updated about 8 hours ago

Created by

🇩🇰Denmark mortendk

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

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.

Production build 0.71.5 2024