optimization - Combining imports in development CSS into 1 file for production -


is there can use merge multiple css imports 1 css file.

for example, let's have main styles.css file has large number of imports during development:

@import url('normalize.css'); @import url('1.css'); @import url('2.css'); ... @import url('10.css'); 

i separate them during development own sanity.

i'd minimize http requests during production though 1 styles file, rather 11, 12 , etc.

so, there something, other manually copy/pasting 1 file, can put these imports 1 file?

does less or sass this?

less , sass , more. there many server-side ways collate css files single document (less can js wouldn't recommend lose styling js off)

yahoo yui compressor / rhino same if not mistaken: http://developer.yahoo.com/yui/compressor/#work

if check global options, 1 works you:

-o outfile

  place output in file outfile. if not specified, yui compressor   default standard output, can redirect file.   supports filter syntax expressing output pattern when there   multiple input files.  ex:       java -jar yuicompressor.jar -o '.css$:-min.css' *.css   ... minify .css files , save them -min.css 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -