CSS to Less(css2less.cc)
css2less.cc
CSS to Less
http://css2less.cc/
8 comments
Hi folks,
First thing, Css2less is hosted on our small server by home, so it's kind of hard to handle the amount of today visits :)
Please be patient if server goes down for a few minutes...!
Second thing, I see a lot of good ideas here ! You should definitely propose them on the Github page so it's not lost :
https://github.com/nicooprat/Css2Less
There's still a lot of work to accomplish as you expected it, so it's also the occasion for me to make a call for ruby gurus who could helps us to add this awesome features :
https://github.com/thomaspierson/libcss2less
Thanks all guys for your feedback, much appreciated. Nico
First thing, Css2less is hosted on our small server by home, so it's kind of hard to handle the amount of today visits :)
Please be patient if server goes down for a few minutes...!
Second thing, I see a lot of good ideas here ! You should definitely propose them on the Github page so it's not lost :
https://github.com/nicooprat/Css2Less
There's still a lot of work to accomplish as you expected it, so it's also the occasion for me to make a call for ruby gurus who could helps us to add this awesome features :
https://github.com/thomaspierson/libcss2less
Thanks all guys for your feedback, much appreciated. Nico
The site seems to be down for now, but i suppose it's a lot like the css2sass tool:
http://css2sass.heroku.com/
I've used that and it's quite a nice start, but you shouldn't really expect it to be as good as hand-written LESS or SASS. Lots of the wins of using a preprocessor is in defining good re-usable mixins and hierarchies, and a conversion tool simply can't give you all of that.
IMHO if you want to use SASS/LESS, write all of it from scratch.
http://css2sass.heroku.com/
I've used that and it's quite a nice start, but you shouldn't really expect it to be as good as hand-written LESS or SASS. Lots of the wins of using a preprocessor is in defining good re-usable mixins and hierarchies, and a conversion tool simply can't give you all of that.
IMHO if you want to use SASS/LESS, write all of it from scratch.
> you shouldn't really expect it to be as good as hand-written LESS or SASS.
Even without that, I'd have expected it to at least extract repeated color values into variables, and maybe repeated propsets into mixins.
Because really, from a short test it does little more than me changing my file's extension to .less/.scss
Even without that, I'd have expected it to at least extract repeated color values into variables, and maybe repeated propsets into mixins.
Because really, from a short test it does little more than me changing my file's extension to .less/.scss
Some time back, I built a Ruby gem called lessify[1] and a webapp[2] to do this. Maybe we should combine forces :)
[1] http://rubygems.org/gems/lessify
[2] http://lessifier.heroku.com/
[1] http://rubygems.org/gems/lessify
[2] http://lessifier.heroku.com/
duplicate entry: http://news.ycombinator.com/item?id=3898199
submitted 6 days ago
submitted 6 days ago
this is a great idea, but i'm using the most recent version of chrome and i find it to be very slow to just get the page open :\ otherwise, nice idea
i also liked the linked one in this thread as well: http://css2sass.heroku.com/
i also liked the linked one in this thread as well: http://css2sass.heroku.com/
This would be great if it didn't strip comments and took your redundant css and replaced it with a mixin.
Oh and if it declared variables for repeated values, I'd use it for sure.
edit: Just noticed it doesn't format prefixed properties neatly, lists properties in a weird order, and for whatever reason, the order of elements gets rearranged. That's a major issue... for some reason, my .container ended up at the very bottom.
Oh and if it declared variables for repeated values, I'd use it for sure.
edit: Just noticed it doesn't format prefixed properties neatly, lists properties in a weird order, and for whatever reason, the order of elements gets rearranged. That's a major issue... for some reason, my .container ended up at the very bottom.
I write in LESS to start with. So I took the compiled CSS from less, then tried to run it through the css2less convertor, then recompile what it generates.
Few things I noticed.
[1] Selectors get rearranged
[2] Cannot correctly handle base64 images
[3] Cannot handle child selectors. ie :child / n-th child.
[4] Comments get mangled (confirmed from another commentor below)
[5] Generates duplicate properties (where the duplicates didn't exist in precompiled). Creating duplication properties is actually correct, such is the case where you would want duplicate background properties (to support IE/FF/Chrome gracefully etc). However, you don't want it to generate identical properties where the values are also the same.
[6] font-faces wrong. (To be fair, this is hard to get right even in normal LESS).
All constructive feedback. I'm still impressed that it did a fairly decent job.