Where to put the Sass files was something I thought long and hard about. Initially, they were going to go in the app/ folder. However, the more I thought about it, I realized this was a Bad Thing.
Why? Sass is *not* a dynamic language or template for CSS. Let me repeat that. Sass is *not* a dynamic language or template for CSS. Sass IS a pre-compiling language that allows transformations into static CSS files. One of the beautiful things about our CSS files is that they are static. They are cached on the client and after the initial hit on the website, the client keeps a local copy. This means that we actually cut our HTTP requests down in *half*. More over, by having the CSS be non-dynamic we also have the output go into the public directory where the webserver (not the rails stack) can deal with putting out the information which makes even that one request much faster. The reason that the Sass file should be in public is because it should be made public to anyone wanting to view it. Imagine a firefox plugin that does conversion for you. I'm sure you're familiar with EditCSS or Web Developer that allow you to edit the CSS in-page. Well, I'd really like to modify EditCSS, to EditSass, so that what it does is loads up the css files that are referenced on the page, and then it tries to request where it guesses that a .sass file that corrolates might be. If there is a Sass file, then you can edit the sass file in line and have it update instantly on the page. Then, you just save that edited Sass right over into your application just like we do with CSS these days. Also! If we put them in /app, then people will *assume* dynamic. In reality, what should happen in production mode is that when the server starts up, it parses the Sass files and creates the CSS, then just goes about its business and forgets that they ever existed. This is incredibly fast on our servers. So, all we are doing is adding something that will compile Sass into CSS if its floating around in public and then both files are made truly public. So, that is my reasoning. -hampton. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
