Note that Sass is not meant to be rendered dynamically, which is why the ability doesn't exist out of the box. It's not optimized for it, so this will likely be pretty slow. Also, there are some issues you should think about when dynamically rendering CSS. For instance, most browsers will cache stylesheets, so you should set up something like Rails' resource timestamping to ensure that the stylesheets aren't cached.
Even so, I'd suggest doing as much as possible with inline CSS and having several stylesheets that you switch between before you decide to do this. - Nathan Sean Cribbs wrote: > In working on optimizing my site pre-release, I decided I needed to move > things into CSS that were normally done in my view templates -- I want > to cache as much as possible. However, a lot of these things are > contextual so I needed the CSS to be generated from a controller action. > So... long story short, here's a quick way to create Sass/ERb templates: > > http://pastie.caboo.se/77659 > > Enjoy! > > Sean Cribbs > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
