Javatpoint Logo
Javatpoint Logo

Less Commands

To install Less on the server via NPM:

To invoke the compiler from the command-line, after installing Less:

To compile the Less file and generate CSS:

To get minified CSS as output, you can use the clean-css plugin. After the installation of that plgin, a minified CSS output is specified with --clean-css option:

To get CSS output on Console:

Syntax:

Output:

Pass options to the compiler:

Syntax:


Important Tips:

  • You must include your stylesheets before your script.
  • When you link more than one .Less stylesheet each of them is compiled independently. So variables, mixins or namespaces which are defined in a stylesheet are not accessible in any other.
Next TopicLess Installation





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA