lesser of two evils: @import vs large stylesheet

over 6 years ago from Daniel Ypsilanti, Graphic Designer at UF

  • Grant Palin, over 6 years ago

    If the one stylesheet is not minified and gzipped, that's a good first step to take. Since CSS is just text, it compresses well. Separate files, even if small, require additional requests which just moves the bottleneck.

    From a management perspective, a preprocessor like Sass can be used to manage component styles in separate files, then combine them together into one file for the browser to use. Alternately, plain CSS files can be concatenated (joined together) before upload to the server, or by the server, so the browser only gets the one file.

    0 points