Download & Extend

sub-theme doesn't import parent's css

Project:Drupal core
Version:6.9
Component:theme system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I made an new folder on the sites/all/themes with my new theme with the following .info file:
; $Id$
name = aName
description = a short description
version = VERSION
core = 6.x
base theme = garland

I enabled the new theme but the css file wasn't imported...
I made a blank file named cssfile.css and added: stylesheets[all][]=cssfile.css in the .info file of the theme and everything was fixed. Then I could see the garland/style.css in the source.
Strange....

Comments

#1

Version:6.6» 6.9

I can repeat this in 6.9 , and there are also reports of this in the forums: e.g.: http://drupal.org/node/282094

From the above report in the forum, the change happened between drupal 6.2 and 6.3. From searching through the CVS logs between 6.2 and 6.3 , it looks like this bug was introduced with the patches at #189568: Overriding module CSS with theme CSS.

One might argue that this is the correct behaviour, but I don't think it is in line with the documentation at
http://drupal.org/node/225125

The following are inherited:

  • All style sheets defined in the parent theme, but there is an option so this can be controlled.

    #2

    Status:active» closed (duplicate)

    If I remember correctly, #189568 has nothing to do with this.

    The answer should be here. This odd side effect is the lesser of a bigger problem. If there's a better solution, feel free to set back to active. http://drupal.org/node/163785

    #3

    It's actually this one. http://drupal.org/node/197124 Ignore 163785.

    #4

    Thanks for the clarification. From the discussion at #197124: Unable to ignore module’s and base theme’s stylesheets, it looks like the issue has been well and truly aired, and that the answer is to define a stylesheet with a different name in the sub-theme. I still think the documentation on http://drupal.org/node/225125 could mislead the unwary, so I've added a comment that hopefully makes things clearer at http://drupal.org/node/225125#comment-1241916 . I suppose that one could count this as a documentation bug?