A reliable way to logically minify css? -


to minify this:

h1 {      color: #fff;  } 

you get:

h1{color: #fff;} 

but if had:

h1{color: #fff;} h1{color: #fff;} h1{color: #fff;} h1{color: #fff;} 

minifying wouldn't solve problem. nor this:

h1{color: #fff;} div h1{color: #fff;} 

i tries csscss points out duplicates. other that, wasn't able find reliable way strip out logical redundancies in css. there perhaps tool similar csscss or perhaps php library can kind of logical redundancies?

you can use css-purge achieve looking for.

npm install css-purge -g // no needed if have installed css-purge -i style.css -o style_purged.css 

also if have automated build process using grunt, can use grunt-css-purge


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -