I notice not many people have downloaded the plugin Combine CSS. Without it, I don’t know of a better way to automatically combine CSS files. I was wondering, are 99% of the developers using WordPress just working in a single stylesheet? Is there some other way to combine CSS without the Combine CSS plugin?
5 comments
Comments are closed.
If you have shell access to an Apache server, Google’s Mod Pagespeed is a great way to do so automatically at the server level. It has really powerful options for doing much more than just combining CSS and speeding up your sites.
Is this the answer you are looking for? WordPress has a build-in concaternating of scripts and css. But you have to activate it by yourself with
define( 'CONCATENATE_SCRIPTS', true );
. It seems most of the blog owner doesn’t know this or simply doesn’t care.I agree with you that some of the restrictions on what you can/can’t answer on a site titled “WordPress Answers” are a tad ridiculous. That aside, I will actually provide you with an answer rather than argue the point.
I’m a big fan of CodeKit: http://incident57.com/codekit/
I work with LESS, so I organize my CSS into multiple .less files: reset.less, webfonts.less, forms.less, style.less, etc. Every time I make a change on my local computer to one of these files, CodeKit automatically compiles the whole thing down to the main style.css. That way my code is nicely organized but the site only needs to load a single, compressed stylesheet.
I use Sass and Compass, which offer numerous benefits beside CSS combining and compression. LESS is another great option, as mentioned by @Dalton above. It’s not necessary to purchase CodeKit to use Sass or LESS (though it is a great app), as both are open-source.