Requesting a quick paragraph about how sassy works. Do I just enable the sassy module then add a stylesheets line in my theme .info file?

Comments

fubhy’s picture

Status: Active » Fixed

Yes, you just add your stylesheets like you would normaly... stylesheets with a ".scss" extension will be parsed with SCSS syntax, stylesheets with a ".sass" extension" will be parsed with SASS syntax. You can also use "sassy[] = 'css/myvariables.scss' to add a global SCSS library which would then be available to all your stylesheets without including it manually via the .scss file.

rowbotony’s picture

Hi, thank you for the quick response, that is indeed how I thought sassy would work. In that case I believe my initial post may change to a bug report.

Long story short, I believe there may be a bug that, if a theme name begins with "sass_" sassy doesn't work. Here's what I've experienced - after enabling sassy I created a new theme sass_alpha.

  • To sass_alpha.info I added
       stylesheets[all][] = css/sassy1.scss
       stylesheets[all][] = css/sassy2.sass
    
  • enabled "Recompile all SASS / SCSS files on every page request." here admin/config/development/performance
  • sassy no workie
  • I then renamed the theme and .info file to test_theme, enabled the theme, cleared caches, and made sure my stylesheets were enabled (as this was an Omega/Alpha) template, and everything works fine!

So with the exact same .scss and .sass files, same theme.info file, etc. the theme did not work when named sass_alpha, but did work when named test_theme.

Just wanted to let you know so you could look into it and tell me if this is an edge-case bug, or if I'm just crazy! :) Either way - this is a magnificent module and I am very happy you have created it. I have been wanting to use SASS, but the existing methods to implement SASS within Drupal are a bit convoluted requring several extra steps to use SASS. Sassy is elegantly simple - install sassy, enable sassy, add the .sass/.scss file to your .info file, done! Awesome!

Thank you!
--Tony

fubhy’s picture

Sassy doesn't do anything with and doesn't care for the theme name. Are you sure you cleared your cache after adding those two .scss / .sass files to your .info file?

rowbotony’s picture

Thanks again, I've experimented with these template names for a few hours now... and I can't figure it out... nothing to see here. This was driving me crazy but I can't reproduce it, oh well. Somehow only in my d7.sandbox site the sass_alpha template doesn't work. I copied sass_alpha to sass_alpha_wtf, changed the title and .info file too, and sass_alpha_wtf works just fine with the identical code, even with copious cache cleaning too. I also zipped the themes and installed them on two other D7 sites and both sass_alpha, and sass_alpha_wtf work just fine on the other sites!

In summary - there is no bug here and I can't reproduce the condition on any other site... something is foobar'd in my d7.sandbox, I must just be crazy! Thanks again for your time and this most excellent module! Issue is fixed / closed / done / never was an issue / user error! :)

richthegeek’s picture

Status: Fixed » Closed (cannot reproduce)

Oh good - I'd been going through the regex trying to see if they were catching the wrong part of your filename somehow, but none of them should even affect what's going on (we use substr(name, -5) to get the extension, not regex).

Very very weird error though... you didn't happen to have the Sass module installed as well, did you?

(marking as closed)

watbe’s picture

Status: Closed (cannot reproduce) » Active

Sorry to reopen this issue, but it would be really great if you could include this information somewhere on the module page or in a readme file. It's not terribly intuitive.

richthegeek’s picture

Hi watbe, don't worry about reopening things - Sassy has been through a few changes since last time.

The current installation process:
- Download Sassy (http://www.drupal.org/project/prepro) and Prepro (http://www.drupal.org/project/prepro) from Drupal.org and place them in your sites/all/modules directory.
- Download Libraries (http://www.drupal.org/project/libraries) - your site may already have this for things like IMCE.
- Download the PHamlP library from github (http://github.org/richthegeek/phamlp/downloads) and extract it into your sites/all/libraries directory, such that the folder is named "phamlp" and the path sites/all/libraries/phamlp/SassParser.php exists.
- Enable Sassy (this will also enabled Prepro and PHamlP)
- Any .sass and .scss files in your stylesheets list should now be compiled into sites/default/files/prepro (after you clear the cache ofc)

Hope this helps!

inckd’s picture

Hi
Thanks for fixing my earlier bugs but since I've tried to implement the module since the last update I just get

"comp profiles/themes/css/base.scss comp profiles/themes/css/tablet.scss comp profiles/themes/css/phone.scss"

i.e. the paths to my SCSS files, output like a debug message at the top of my page and none of them rendered. Do you know what might be causing this issue, have I not installed it properly? I have followed your latest instructions.

thanks
nick

richthegeek’s picture

Make sure to update prepro - there were a few bugs with 0.2 which match the errors you describe.

inckd’s picture

The Prepro update thas sorted it, thanks

richthegeek’s picture

Status: Active » Fixed

Feel free to re-open this if anyone has further issues.

Status: Fixed » Closed (fixed)

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