ericmckean / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Re-arranging CSS to minimize the gzip output #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've found an interesting article about CSS compression and gzip.
It shows techniques to improve data compression by simply reordering CSS
properties.

I think it would be interesting to improve minify :)

Here is the link
http://www.barryvan.com.au/2009/08/css-minifier-and-alphabetiser/

Thanks for your tool !
(PS : Sorry, I've no time to implement that to minify myself, so I just
give you the idea :) )

Original issue reported on code.google.com by bist...@gmail.com on 10 Sep 2009 at 1:54

GoogleCodeExporter commented 9 years ago
Re-ordering properties can change effective values, so you need a full CSS 
parser & 
some very complicated logic (which no one has developed yet--the article admits 
if 
your sheet depends on property order it may be broken).

In PHP this would likely have to be built into an extension of CSSTidy's 
"csstidy_optimise" class:
http://csstidy.svn.sourceforge.net/viewvc/csstidy/trunk/

I'm not holding my breath, and I'm likely to stick with our inferior minifier 
as the 
default since it preserves a lot of CSS hacks.

Original comment by mrclay....@gmail.com on 21 Sep 2009 at 2:57