Home › Forums › CSS › Only load css that is actually needed › Re: Only load css that is actually needed
October 18, 2012 at 8:36 am
#112226
Participant
If no mistake, having a 20Ko CSS file (minified/gzipped) is better than having 2* 6-8Ko CSS file (resulting in 12 to 16Ko of CSS).
What is costly is not parsing CSS, it’s doing a HTTP request. So I’d probably go with only one file minified and gzipped. If your CSS is clean, the parsing will be fast, then it’s browser cached anyway.
If you want to manage different files in production to ease the development, then use a pre-processor like LESS, Sass or whatever and their clean @import function.