rbginge rbginge - 1 month ago 6
Less Question

CSS to SASS (or LESS) conversion

Can anyone recommend some CSS to less, or CSS to sass conversion tools? I have found a few .e.g. http://css2less.cc/ and http://css2sass.herokuapp.com/ but any insight into their reliability (or recommendations of other tools) would be greatly appreciated. I have a large CSS code base for a white label solution which would benefit greatly from having a CSS preprocessor in place but it would be a huge task to manually convert to sass/less.

Thanks in advance

EDIT: I should emphasize I'm particularly interested in experiences of using a tool (such as those listed above (in the absence of any better ones)) to convert a large CSS code base towards using a CSS preprocessor such as SASS or LESS. Or if any other ways (other than the tools listed) to achieve such a feat are pragmatic. What hurdles did you have to overcome? Is it even worth attempting? Or are such metalanguages only suited to a new project where you can start from scratch?

Answer Source

The good thing about SASS is that you don't need to convert CSS into SASS, since SASS is an extension of CSS.

Simply copy and paste and you're good to go.

If you're looking to refactor your CSS into well structured SASS files though, thats something i don't think a tool can do.