Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By CactusWren on
NOTE: I got it sorted after finding a similar topic posted 11 months ago. I was using libraries-override when I just needed to point to the library in my theme.
I'm trying to override a stylesheet in my Business Responsive theme with my own stylesheet in my Business Sub (sub-theme made from the Business Responsive theme).
The file I'm trying to override is:
themes\business_responsive_theme\css\custom-style.css
With the file:
themes\business_sub\css\custom-style.css
My business_sub.info.yml has this relevant part:
libraries-override:
business_responsive_theme/global-components:
css:
theme:
/themes/business_responsive_theme/css/custom-style.css: /themes/business_sub/css/custom-style.css
But nothing happens. Anything obvious I'm doing wrong here?
NOTE: Here is the solution.
# business_sub.info.yml
libraries:
- business_sub/global-components
# business_sub.libraries.yml
global-components:
css:
theme:
css/custom-style.css: {}
# custom-style.css
* {
color: green;
}