Forgive me if I'm missing something obvious, but I've tried creating an Aurora sub theme off of the 3.0 release. However, my subtheme's compiled CSS file (style.css) is not loading -at all- even though it's included in the .info file, and (yes) the theme is set to default. By 'not loading' the link to the file is not appearing in the stack of CSS files called.

Actually, the generated .info file calls two files - style.css and formalize.css - and neither are being loaded.

When I ran the 'compass create -r aurora --using aurora/polaris' command, there was a message *in the command line* to the effect:

To import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:

I ignored it at first, because it is not mentioned anywhere on the project page or in the online documentation that you will need to manually add links to your CSS file via html.tpl.php.

However, that is so far the only thing that I've been able to get to work.

So, I guess my issue has a couple facets:
1. Is this a bug, or is the theme designed to not load CSS files, even if they are in the .info file?
2. If the CSS files are deliberately being suppressed via the normal .info mechanism, is there a reason why?

Things I've tried:
1. I tried creating an aurora subtheme and a polaris subtheme, both with the same result
2. Disabling most modules - at least, ruling out the usual suspects (devel, etc)

Any help or insight would be greatly appreciated. Thanks!

Comments

Snugug’s picture

I'm not entirely sure what the issue you're having is as the stylesheets absolutely do get pulled in. Having just done a 100% clean install of Drupal and a brand new subtheme, I can tell you that stylesheets declared in your .info do in fact, without a shadow of a doubt, get pulled in normally. Additionally, there are 0 lines of code in Aurora designed to interfere with CSS Handling, so if you've disabled all modules, then I think this may be an education issue as it's not a technical one. So to that, a few questions:

  • Are you writing Sass and not compiling it into CSS? That would be my frist guess as to why you don't see changes made even if you're making them.
  • Are you using Magic and excluding CSS from there? Magic will exclude CSS from the current theme if you write a pattern that would match CSS in the current theme. If so, simply including ~:current-theme will tell Magic to keep your current theme's CSS
  • Are you caching and aggregating your CSS files while developing? If so, you should turn that off and clear your cache.
  • Just to be clear, you ran compass create with the name of your subtheme to that it created a new folder for your theme and not just stick it in your themes folder?
chippper’s picture

Status: Active » Closed (works as designed)

Thank you for your quick, thoughtful reply!

To answer your questions:
- I'm writing in SASS, yes, and compilation to CSS has not been an issue. When I added the link to the stylesheet manually in the html.tpl.php file, it worked fine. I have since removed that manual link to the CSS file and I'm back to no stylesheet.
- I haven't done anything to the Magic settings
- I don't have CSS aggregation turned on
- Yup - I cd'd into my sites/all/themes directory and ran 'compass create [mythemename] -r aurora --using aurora/polaris'

So I just found what I think may be the issue on my end. Here is what the generated info file looks like with regards to CSS files:

; ========================================
; Stylesheets
; ========================================

stylesheets[all][] = 'css/style.css'
stylesheets[all][] = 'components/formalize/assets/css/formalize.css'

The problem, though, is that there is *no* "css" directory. It's called "stylesheets". Plus, there is no 'components' directory as well, hence why the other file is not getting loaded either.

I've manually changed it to read:

stylesheets[all][] = 'stylesheets/style.css'

And everything is right as rain.

That got me wondering - why is it looking for a /css/ directory when it's called /stylesheets/?

One big piece of info that I neglected to mention: I *had*, previously, a copy of the 2.x branch of Aurora installed in my sites/all/themes directory. Before installing Aurora 3.x, I had renamed the folder and adjusted the .info file on that (I had another subtheme based on it, so I didn't want to get rid of it entirely). I also *thought* that I had updated the Aurora gem before trying an Aurora 3.x subtheme.

But, just to be sure, I removed my old Aurora theme entirely, plus all generated subthemes. I re-initiated installing the Aurora gem, and saw that installed version 3.0.5.

I then created a *new* subtheme, and the info file spits out this:

; ========================================
; Stylesheets
; ========================================

stylesheets[all][] = 'stylesheets/style.css'
stylesheets[print][] = 'stylesheets/print.css'

Which, to my eye, seems correct.

So I guess the morale of the story is that moving between Aurora 2 and 3 is a bit more of a nuke-and-pave operation than I thought it would be.

There are a couple mysteries remaining, however:

- In the generated template.php file, there is reference to '/javascripts/hammer.js' - though there is no 'javascripts' directory to speak of. I can manually add hammer.js easily enough, but I thought it was worth mentioning
- I don't understand why the first two Aurora-3-based subthemes would be looking for a /css/ directory. Even if the old Aurora was somehow causing conflicts, the file structure it generated used /stylesheets/ as well.

As the main CSS issue seems to be working now, I'm going to mark this closed (works as designed). I would love to hear any thoughts on the last two points, though.

Snugug’s picture

Hammer.js should have been removed, not sure why it's still being referenced. I'll look into that.
One of the early versions of the Aurora 3.x gem hard coded the path instead of building it dynamically. That has been fixed in the most up-to-date version of the gem. Make sure you've got the most updated gem before you go to build a new site.

chippper’s picture

Gotcha. I'm working with the 'release' version of Aurora 3, not the dev version, if that is any help.

I did look back and I had previously had the gem compass-aurora-3.0.0 installed. I guess I grabbed it too early ;)

mausolos’s picture

I ran into this as well. I'm using the current release (7.x-3.4). I opted to take another, albeit hackier approach. I simply created a symlink in my sub-theme's rendered css folder to the base theme's style.css, and called it '.css'. Then I added that to my sub-theme's .info. Works fine, though I should note the themes probably load in an alphanumerically ordered fashion, so you'll want to take that into consideration. That said, it's a symlink, you can call it whatever you want.