buntarb / closure-stylesheets

Automatically exported from code.google.com/p/closure-stylesheets
Apache License 2.0
0 stars 0 forks source link

The minification actually makes the stylesheet bigger. #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a input.css file:
---------------
#first, #second, #third {
    width: 100px;
    height: 100px;
    color: #ff0000;
    background-color: #00ff00;
}
#second {
    width: 105px;
}
---------------

2. Run: java -jar closure-stylesheets.jar --output-file output.css input.css

What is the expected output? What do you see instead?

Expected (and YUI Compressor achieves this), 100 bytes:
---------------
#first,#second,#third{width:100px;height:100px;color:#f00;background-color:#0f0}
#second{width:105px}
---------------

With Closure I get a 204 byte file instead (original was 138!):
---------------
#first{width:100px;height:100px;color:#f00;background-color:#0f0}#second{height:
100px;color:#f00;background-color:#0f0}#third{width:100px;height:100px;color:#f0
0;background-color:#0f0}#second{width:105px}
---------------

What version of the product are you using? On what operating system?

I'm using the initial release, SHA1 5d8092ec7287f8b05b41ff71f52ff2dc0576f414

Windows 7 64bit SP1

Please provide any additional information below.

This sucks big time.

Original issue reported on code.google.com by xxStrom on 15 Nov 2011 at 2:44

GoogleCodeExporter commented 9 years ago
When gzipped (you are gzipping right?) the size for both the yahoo and google 
compressed files is the same: 99B

Does NOT suck big time. I assume google is targeting the best minification for 
gzipped files (as they do with the closure js library)

Original comment by alv...@gravitydev.com on 4 Feb 2012 at 3:41