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' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -