sass - How to convert Less to Scss?

ID : 274510

viewed : 53

Tags : sasslesssass

Top 5 Answer for sass - How to convert Less to Scss?

vote vote


The less2sass converter is pretty good and maintained

Install it (you need on your system)

npm install -g less2sass 

Once installed you can simply run

less2sass <path_to_less_file_or_directory> 
vote vote


this works okayish:

npm install -g less-scss-convertor less-scss-convertor src\less 

creates src\less\scss

vote vote


This online option seems to work well. Paste in an entire file to convert it.

vote vote


The one that worked best for me is this:

npm install less2scss --global less2scss -s ./less_folder  -d ./scss_folder -r -e 'node_modules,vendor'

I just tried it and it seems I don't have to change anything on the converted files. You can exclude folders, it works recursively and you can define a target folder. Love the functionality.

vote vote


You could try using parts of Bootstraps's converter to create your own:

However in most cases there will always be some cleanup you need to do manually.

Top 3 video Explaining sass - How to convert Less to Scss?