Thanks to visit codestin.com
Credit goes to github.com

Skip to content

arusanov/less.js

 
 

Repository files navigation

Modified Less.js

The dynamic stylesheet language. http://lesscss.org.

This is the fork of JavaScript, official, 2.7.2 version of Less with few additions:

Simplify option

New option simplify:boolean will transform all stylesheet except for root variables.

From:

@mainVar: #fff;
.main-@{mainVar} {
  @hiddenVar: red;
  left: 1px;
  border-color: mix(@mainVar,@hiddenVar);
  color: @mainVar;
    @{mainVar}-left: middle;
}
@media all and (max-width: @mainVar) {
  .hohoh {
    color: red;
  }
}

It will produce following less

@mainVar: #fff;
.main-@{mainVar} {
  left: 1px;
  border-color: mix(@mainVar, red);
  color: @mainVar;
  @{mainVar}-left: middle;
}
@media all and (max-width: @mainVar) {
  .hohoh {
    color: red;
  }
}

Also there's 2 additional options:

  1. simplifyLevel: number which level is root. default:1
  2. simplifyFilter: Regex filter variables to keep, default: null

Rollup browser build without heavy stuff

Size ~38kb gzip

Copyright (c) 2009-2016 Alexis Sellier & The Core Less Team Licensed under the Apache License.

About

Less. The dynamic stylesheet language.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 67.1%
  • CSS 32.8%
  • HTML 0.1%