I need a real optimization / compilation of my CSS styles (and not just minification), in the same vein as the Google Closure compiler for JavaScript.
For example, if my entire stylesheet is simple:
div#hello { color: #FFF; background-color: #000; } div#hello p { color: #FFF; margin-top: 10px; margin-bottom: 10px; margin-right: 10px; margin-left: 10px; font-family: Helvetica, Arial, sans-serif; } a { color: #FFF; margin-top: 10px; margin-bottom: 10px; margin-right: 10px; margin-left: 10px; font-family: Helvetica, Arial, sans-serif; }
This can be optimized (I keep the gaps here for readability, but obviously this would also be needed):
#hello { color: #FFF; background: #000 } #hello p, a { color: #FFF; margin: 10px; font-family: Helvetica, Arial, sans-serif }
source share