less.ruby
less.ruby copied to clipboard
Compression doesn't work correctly
Compression broke the CSS.
Will need more investigation to narrow down the issue, but have to throw it out here so you know.
Oh, now that I think of it, it'll break stuff like "solid 1px black", I have to come up with a comrpession algorithm or something.
May be a good idea to have a look at other open source CSS compressors to see how they do it? Maybe just use the code from one? Don't know if there's any in Ruby.
Going back to thinking about the feature set of LESS -- do we need a compressor? I'm leaning on the side of "yes" because of this: with LESS you don't actually touch the CSS code, so if you don't touch the CSS there is no reason to waste space keeping it more organized for human readers. I think there should be a system to import multiple LESS files into one (sort of like @import, like sass also has) and then the output will be one big compressed CSS file from the one compile. That to me seems like the optimal setup for the developer working with LESS. Maybe they don't even need multiple LESS files, given that LESS saves a lot of duplication. Actually, that's one nice way of describing LESS -- it makes CSS DRY :)
P.S. I must also note that while I said above that LESS should probably come with compression, it's not a feature that yields high gains. Uncompressed CSS won't break your project. Most people won't even care unless they're getting 100k visitors a day and they really need to minimize the file sizes. I think LESS should have it, but there are some other fixes to be made that will yield much bigger benefits, meaning this particular feature should not be high on the list of priorities.
agreed, I'm leaving it for the next version
IMHO: strip comments and whitespace, don't mess with compression. Leave it to the web server.
Less is really great!, but there are things you can do with normal css coding that can save lines of code, of the resulting css file of a less. So to avoid to have a file with more weight for now you can compress the file to loose some kb. Resuming i think compressing is really important. What about the compress feature of the Less.app ?? there are something in there we can use ?