1

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.

2
  • What type of server/server technology? Linux/PHP, etc Commented 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.6 Commented Jan 22, 2010 at 12:26

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.