Top
Home




Importing



Importing works pretty much as expected. You can import a .less file, and all the variables in it will be available. The extension is optionally specified for .less files.

@import "library"; // library.less
@import "typo.css";



Variables



   Control commonly used values in a single location.

Overview

It's not uncommon to see the same value repeated dozens if not hundreds of times across your stylesheets:

a,
.link {
 color: #428bca;
}
.widget {
 color: #fff;
 background: #428bca;
}

Variables make your code easier to maintain by giving you a way to control those values from a single location:

// Variables
@link-color:        #428bca; // sea blue
@link-color-hover:  darken(@link-color, 10%);

// Usage
a,
.link {
 color: @link-color;
}
a:hover {
 color: @link-color-hover;
}
.widget {
 color: #fff;
 background: @link-color;
}

More Help