Wylbur's picture

I'm installing a subtheme of MiniCSS theme.  In my info file I added a CSS file to contain overrides for the base theme CSS.  When I test this, the base theme CSS files are imported AFTER the subtheme CSS files, so creating simple CSS styles like "footer { font-color: red; } get overwritten by the base theme styles.  

I do not remember this ever being an issue with D7, am I doing something wrong here, or is there some trick to making this work?

Accepted answer

I'd recommend to (also) ask – or to report the issue – in the queue of the Mini CSS theme: https://github.com/backdrop-contrib/minicss/issues

edit: The maintainer of the theme just contacted me via Gitter and posted a link to the issue Dealing with sub-theme stylesheet on Github where he describes how to get the sub-theme CSS after the one of the parent-theme.


Here is a example .info file from one of my sub-themes.

  1. Have you defined your base-theme?
  2. Have you enabled your base and your sub theme in the UI?
  3. Have you properly identified your css stylesheet?
name = stpaultim
description = This is a sub-theme of theme Basis
backdrop = 1.x
base theme = basis

stylesheets[all][] = css/styles.css
scripts[] = js/scripts.js

Be sure to check out this page:

Here is a similar issue with Bootstrap Lite theme:

Maybe this is your issue:

Here's my subtheme file, everything seems to be in order, but I don't have a version.  Is that needed?

I even renamed the include file to see if that helped.  

Base theme is not enabled, but subtheme is.  

name = AI Group 37  Theme
description = AI Group 37 website theme built on MiniCSS theme 02/28/19
backdrop = 1.x
base theme = minicss

stylesheets[all][] = zaimini.css

Here's the output of the head section, showing the base theme CSS being included AFTER the subtheme. 

<style media="all">
@import url("http://ai37.docksal/themes/aimini/zaimini.css?pno6ij");
@import url("http://ai37.docksal/themes/minicss/css/dist/mini-default.min.css?pno6ij");
@import url("http://ai37.docksal/themes/minicss/css/styles.css?pno6ij");
@import url("http://ai37.docksal/themes/minicss/css/custom.css?pno6ij");

Do I need to make the subtheme name an alphabetic AFTER minicss?

Thanks, I'm following up the issue there,  Should have just started there but did not realize about the Github issue queue. Let's close this as resolved.