Splitting WordPress theme CSS into multiple files, good or bad?

I’m developing a WordPress theme framework. I want organize CSS for each section into separate files for the following reasons.

  1. Developers can easily deregister styles by parent theme and load their own styles.
  2. Easy to maintain.
  3. I can load only the required styles based on the options selected by the user.

Disadvantages
Extra http requests => more load on the server.

This disadvantage can be taken care by combining all the CSS files before they are served to the user using plugins like wp-minify.

But, will this combining process out weigh the above advantages.

3 s
3

From http://headjs.com/ :

There is a common misbelief that a single combined script performs best. Wrong:

  • latest browsers and Head JS can load scripts in parallel. loading 3 parts in parallel instead of as a single chunk is usually faster.
  • iPhone 3.x cannot cache files larger than 15kb and in iPhone 4 the limit is 25kb. And this is the size before gzipping. if you care about iPhones you should respect these limits

(i dont know if it means .css and .js or only .js)

Leave a Comment