steal.less steal/less

 

steal('path/to/filename.less')

Parameters

  1. path {String}

    the relative path from the current file to the coffee file. You can pass multiple paths.

Returns

{steal(moduleIdRef, definition)}

returns the steal function.

Lets you build and compile Less css styles. Less is an extension of CSS that adds variables, mixins, and quite a bit more.

You can write css like:

@brand_color: #4D926F;
#header {
  color: @brand_color;
}
h2 {
  color: @brand_color;
}

Use

First, create a less file like:

@my_color red

body { color:  @my_color; }

Save this in a file named red.less.

Next, you have to add the less entry to the stealconfig.js file so it looks like this:

steal.config({
    ext: {
        less: "steal/less/less.js"
    }
});

This will automatically load the Less parser when the Less file is loaded. It's expected that all Less files end with less.

You can steal the Less file like any other file:

steal('filename.less')