Friday, May 19, 2017

Convert LESS to SASS!

  1. Get Ruby! (I'm sorry.)
  2. Run the command gem install less2sass as suggested here.
  3. less2sass whatever.less whatever.scss as a command will then make a new whatever.scss file from a file called whatever.less and I bet you can see how you might use other names, huh?

 
 

If whatever.less had this in it:

@lucky: 13;
.luckyBuffer {
   padding: @lucky;
}

 
 

Then whatever.scss would look like:

$lucky: 13;
.luckyBuffer {
   padding: $lucky;
}

 
 

Note that a @mixin will not be ported.

No comments:

Post a Comment