css-condense icon indicating copy to clipboard operation
css-condense copied to clipboard

Take a look at csso

Open arikon opened this issue 13 years ago • 4 comments

Hi!

Have you looked at csso created by @afelix? https://github.com/css/csso

The goals of this project are the same. Do you mind to join forces?

arikon avatar Sep 03 '12 06:09 arikon

Thanks! That's cool! I don't know what to contribute though, it seems they've already implemented the things I wanted to implement for css-condense aready haha.

rstacruz avatar Sep 03 '12 06:09 rstacruz

Hmm, looks like their structure minimization is more conservative that css-condense's. Which is great and safe, but css-condense aims to be a bit more "living on the edge". eg:

div { color: blue; }
.box { background: green; }
a { color: blue; }

csso:

div{color:blue}.box{background:green}a{color:blue}

css-condense:

.box{background:green}a,div{color:blue}

...reordering the items to put the div and a rules together works for cssc though.

rstacruz avatar Sep 03 '12 06:09 rstacruz

Thanks! I guess @afelix will join the discussion a bit later ;)

arikon avatar Sep 03 '12 08:09 arikon

Yep, safety is the number one choice. :) In the first versions there were many optimizations like you provided (in the comment), but sometimes it will make CSS-compressor in trouble. General rule: if you are changing the order of rulesets (i.e. .x {..} .y {..} .z {..} -> .x, .z {..} .y {..}), someday some user will post you an issue about different rendering of the style before and after. Sure, it is possible to try to distinguish safe cases and not very safe, but... it will be interesting to watch. :)

afelix avatar Sep 03 '12 08:09 afelix