On larger projects I have segmented stylesheets that have rules written for specific modules. I'd like to be able to automate a process that minifies my CSS (at least remove commenting) and also combine multiple CSS files into a single asset to minimize requests.
-
What type of server/server technology? Linux/PHP, etcDoug Neiner– Doug Neiner2010-01-21 01:48:19 +00:00Commented Jan 21, 2010 at 1:48
-
I'm using ruby and rails for most of my projects but some are also in Python. My production servers run ubuntu and my dev machine is a mac running 10.6Jim Jeffers– Jim Jeffers2010-01-22 12:26:36 +00:00Commented Jan 22, 2010 at 12:26
Add a comment
|
1 Answer
If you are using PHP 5+ I would highly recommend Scaffold. It blew my mind when I saw how easy it was - yet how powerful. Watch the video to see it in action
Supports:
- Constants
- Mixins
- Nested Selectors
- Expressions
- Caching and gzipping
- Extendable through plugins
Thus you can do things like:
/*include/aggregate other CSS files*/
@include '/css/reset.css';
@include '/css/sections/layout.css';
#foo{
background-color:#efefef;
color:#333;
/* nested selectors will expand in the output */
a{
color:#11f;
padding:2px;
}
}
and have the whole thing minified, gzipped and cached as a single CSS file
1 Comment
Jim Jeffers
Interesting I personally am using ruby so I wonder if there is anything like this in other languages. I know Rails does all of these things except minify. Maybe I'll have to extend it myself.