
By drupaldope on
In my subtheme, I want to override the layout builder's CSS library, I tried the following :
libraries-override:
layout_builder/twocol_section:
css:
theme:
layouts/twocol_section/twocol_section.css: css/layout_builder/layouts/twocol_section/twocol_section.css
layout_builder/threecol_section:
css:
theme:
layouts/threecol_section/threecol_section.css: css/layout_builder/layouts/threecol_section/threecol_section.css
but (after clearing the cache) that didn't work.
what am I doing wrong ?
Comments
What is your base theme?
What is your base theme? Check whether these libraries have been overridden previously in the base theme.
ah thanks!
ah thanks!
it's this old issue again:
https://www.drupal.org/project/drupal/issues/2642122
silly me, I even forgot I wrote a reminder about it
https://drupaldope.com/drupal-9-tricks/drupal-themeing-overriding-librar...
nice brain fail on my part, thank you for the pointer !
What do you do if they were
EDIT.
Got this working. This is the important line to note if you're overriding the css with your own.
Path to the css file on the left (from the subtheme) and path to YOUR css file on the right.
this part of themeing is
this part of themeing is really tricky
Looks like there might be a
Looks like there might be a typo in your
libraries-override
for the layout builder. The second path undertheme
should likely point to your actual CSS file, not the core layout builder CSS again. Try this:Remember to replace
your_twocol_section.css
andyour_threecol_section.css
with the actual filenames of your override styles.