0

My question is about advanced optimizing Cascade Style Sheets (CSS) files for production.

What a the most new and completed (ready to be used in live projects) css optimizers/minimizers that provide not just removing of white spaces and line breaks but also advanced features as removing excessive attributes, merging similar classes and so on..

There are some good online tools like: http://iceyboard.no-ip.org/projects/css_compressor

But I would like to see available implementations to be included in automatic building.

4
  • merging similar classes How do you propose that works? See something like yahoo developer.yahoo.com/yui/compressor Commented Nov 2, 2011 at 14:16
  • Well, I did not invent it. You may easily have excessive parts in your final css code especially if you use dynamic languages as SASS ans LESS. Commented Nov 2, 2011 at 14:29
  • Merging similar classes... only a human could do that, unless you've got .class { color: red; } and .class { text-decoration: underline' } right next to each other? Also removing excessive attributes, care to give an example? As far as I see it this too is highly subjective. It's all well and good chasing those last few kb, but is it really worth it? Instead, look into the performance of your selectors. Commented Nov 2, 2011 at 14:32
  • Yes I by merging (combining) similar classes I mean what you have written. Is is possible. When writing CSS with dynamic languages like SASS or LESS (using MIXIS) it is likely to have some overrides of mixis's properties for particular css selector. So after compilation you can easily have two "width" or "background" attributes for one selector in compiled css, but only last attribute will have an effect. Well if you write clear CSS on your own without any ontop CSS frameworks this problem is not so obvious. Commented Nov 2, 2011 at 14:39

1 Answer 1

1

... the yahoo compressor is the most robust one IMHO

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

Comments

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.