By chrisabbato on
I just started playing around with drupal this week, and I am trying to learn the basics of the theme system. From what I have read so far, making a sub-theme should be as simple as making a new file under sites/all/themes/
/
.info and setting a base theme. However, when I do nothing more than make an info file to inherit a base theme, none of the css rules are applied to my sub-theme when I enable it. Is there something I'm missing?
Comments
I have the same problem
I have exactly the same problem with this, I created a subtheme with bluemarine as the base theme, and the bluemarine stylesheet is not inherited even though I specified it in the .info file.
I then copied the style.css from bluemarine into my subtheme directory and this worked ok, inheriting the styles and overriding the ones specified in my subtheme stylesheet.
Copying the stylesheet from the base theme is a solution to my problem, but is this a bug in drupal which needs to be looked at or am I missing something ?
I tried something similar
I also tried copying over the base theme's style.css but that didn't even work for me. Searching online I haven't really found this to be a problem anywhere else.
Same problem
I assume you are looking at Learning Drupal 6 by Matt Butcher. I have the same problem, I can't get the new theme to inherit the bluemarine style.css. My info file looks as follows:
; $Id$
name = Descartes
description = Table-based multi-column theme with a Cartesian flavor.
version = 1.0
core = 6.x
base theme = bluemarine
stylesheets[all][] = style.css
stylesheets[all][] = new.css
If I copy the bluemarine style.css to the descartes theme folder it all works. Any ideas on how to get it to inherit the bluemarine style.css properly?
Andy
It's a bug
Turns out this is a bug in 6.2, 6.3 & 6.4 of Drupal. It's been reported.
Andy
I can add that this is ALSO
I can add that this is ALSO a bug in drupal 6.5 and I lost a day pulling what's left of my hair yesterday on it.
Basically it make sub theming useless, because once you start pulling style.css or whatever file into the sub theme directory you have all your referenced image to pull into it too and all referenced stylesheet and in the end you copied the whole theme.
And inheriting from garland is overly complicated, garland had hard-coded references to "misc" that make even copying it very hard.
I just needed to play and learn with node.tpl.php and page.tpl.php and now I am a bit puzzled on the right course of action.
The odd thing is that sub theme of the "official" / base themes seems to work fine ... is it a return of the "need to be a sub rep" thing ? because most of them are sub rep of their parent theme .. ?
thanks
Thanks for the info, I will attempt to workaround it for now so I can practice.
I had the same problem.
I had the same problem. Putting
stylesheets[all][] = ../themes/bluemarine/style.cssin .info worked and was a better work around for me. It does require that you have any images referenced from that stylesheet in your new theme folder but that's recommended anyway.
Bah
I am having this problem in 6.10! I am trying to make a sub-theme of a contributed theme that lives in sites/all/themes/whatever. I have tried by sub-theme in /whatever/subtheme and sites/all/themes/subtheme.
Neither works, the styles are not inherited from the base.
Is this still just "not working?"
.cw.
I'm also confused about these
I'm also confused about these css-files. Have found this errata https://www.packtpub.com/support?nid=1105 and for page 72:
Errata type: Code | Page number: 72
The current code says:
stylesheets[all][] = style.css
stylesheets[all][] = new.css
Should be like this:
stylesheets[all][] = descartes-style.css
stylesheets[all][] = new.css
Otherwise the subtheme will not inherit style.css from bluemarine.
but if I look in the books printscreen there are NO file called descartes-style.css - so doesn't the file need to be in this theme or should I just write it in the .node file or?
Just add the stylesheets you changed.
You should only include styles from your subtheme. This behavior has changed a couple of times early in the D6 release cycle. I believe that current releases would require something like this:
stylesheets[all][] = new.css
If you added style directives to a file called style.css and you still want to inherit the parent theme's style, you will need to either rename your style.css to something else (descartes-style.css in the above) or copy the parent's style.css and merge the two into one file.