I can't override ninesixty's styles.css file in my subtheme. I've added this to my .info file, but ninesixty's styles.css continues to be loaded:

; override ninesixty's stylesheets by adding empty files
stylesheets[all][]   = text.css
; stylesheets[all][]   = debug.css
stylesheets[all][] = styles.css

text.css disappears as intended, but styles.css persists.

After a very quick glance, I think this may be a problem with ninesixty_css_reorder(). Does it check to see if a subtheme has overridden styles.css before reordering everything? Or does it interfere with the override system in some way?

Comments

dvessel’s picture

Category: bug » support
Status: Active » Closed (works as designed)

This is because of how core handles overrides from a base theme to its child. It's not really smart about it and we got this feature by accident. (As opposed to theme styles overriding modules which was explicitly designed in.)

Ninesixty's style sheets are defined to be in a sub-directory to keep it tidy and this was defined from the .info file to point in the right place..

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

What the sub-theme must do is match that directory structure since the overriding behavior depends on that whole string. It's either that or keep everything flat. But then that also forces any sub-themes to be flat also. This can be worked around with code but I'd hate to do it. A standard directory structure that keeps things organized I prefer.

dvessel’s picture

Category: support » task
Status: Closed (works as designed) » Active

BTW, the reason why text.css does override is because of that reordering. I could modify it so it's more consistent. I forgot for a second that I had that code in place. Should it be done? I was thinking of stripping it out altogether once we had css weights in core.

todd nienkerk’s picture

dvessel: Using the full path in my subtheme's .info file worked.

I replaced this:


; stylesheets[all][] = styles.css

...with this:


; stylesheets[all][] = styles/styles.css

...and styles.css vanished, as expected. I did not need to reorganize any of my subtheme's .css files into a new directory structure.

More thoughts to come...

armyofda12mnkeys’s picture

seems like this isn't needed anymore?
My override in my 960 subtheme directory is working.

(I also do have template.php and theme-settings.php though copied over (as that is what i was used to doing when doing Zen subtheme's i beleive) and inside of that zen_ninesixty_ renamed to my_theme_ where appropriate in functions and also ns() had to be deleted since would be declared twice in 960 theme and in my 960 custom subtheme)

dvessel’s picture

Status: Active » Fixed

Yeah, no longer an issue. This behavior was changed in core some time back. Directory structure doesn't have to match. Just the name of the style.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.