The background_image.css.twig (https://git.drupalcode.org/project/background_image/blob/8.x-1.x/templat...) appears to be overrideable in a custom theme given it is a twig file in the templates directory.

However it is hardcoded in https://git.drupalcode.org/project/background_image/blob/8.x-1.x/src/Con...

CommentFileSizeAuthor
#4 3091008-4.patch5.19 KBmarkhalliwell

Comments

cashwilliams created an issue. See original summary.

cashwilliams’s picture

$this->themeManager->alter() might attempt to allow it to be overridden, but I've copied it to my custom theme directory and any changes within are not reflected.

markhalliwell’s picture

Title: CSS twig file is not overrideable » Auto-detect theme based CSS Twig template overrides
Assigned: Unassigned » markhalliwell
Category: Bug report » Feature request

Simply creating the file in your theme's template directory wouldn't cause it to be picked up.

You, currently, have to provide the actual path to your theme's implementation.

This template isn't part of the theme registry (which automatically adds these paths).

There's too much overhead and also intended for HTML templates, not CSS.

Instead, a full path to the template must be provided.

See: https://git.drupalcode.org/project/background_image/-/blob/8.x-1.x/backg...

---

That being said, I suppose it would make sense to just auto detect this file in a theme to begin with and then run the alters.

markhalliwell’s picture

Assigned: markhalliwell » Unassigned
Status: Active » Fixed
StatusFileSize
new5.19 KB

  • markcarver committed 7e317be on 8.x-1.x
    Issue #3091008 by markcarver, cashwilliams: Auto-detect theme based CSS...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.