Assuming you're using Rails, when Sass compiles depends on what mode 
you're in. In development mode, it recompiles whenever it thinks it 
needs to; what this means is that every time Rails processes a request, 
Sass will check if the stylesheets have been updated, and recompile them 
if so. However, Rails never sees static CSS file requests; those are 
handled entirely by Mongrel, Lighttpd, Apache, or whatever server you're 
using. So if you're refreshing the CSS page, nothing will happen.

In production mode, Sass is compiled on the first request to the server.

You can always force a recompile by calling Sass::Plugin.update_stylesheets.

Note that this behavior has changed a bit recently, so if you aren't 
using the most recent release (v1.8.2) or a Git branch, the above might 
not be totally accurate

- Nathan

Dan Croak wrote:
> Hey folks,
>
> Just started using Sass today. I can't figure out when compilation
> occurs from Sass to CSS. I guess I want:
>
> in development: any time I make a change to a .sass file, then reload
> my browser, the css file is re-compiled. I suppose that could be done
> by overriding how stylesheet_link_tag works.
>
> in production: a Capistrano recipe that compiles any new .sass files
> or any .sass files that have changed since the last deploy.
>
> My understanding thus far is it doesn't work that way. I've been
> doing:
>
> sass public/stylesheets/sass/screen.sass > public/stylesheets/
> screen.css
>
> after every change.
>
> Can someone provide some knowledge on when Sass compiles to CSS?
>
> Thanks!
> Dan Croak
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to