less.js README

The project's README from github.com/less/less.js. As one markdown file: README.md.

Github Actions CI Downloads Twitter Follow

This is the Less.js monorepo.

More information

For general information on the language, configuration options or usage visit lesscss.org.

Here are other resources for using Less.js:

Contributing

Please read CONTRIBUTING.md. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Reporting Issues

Before opening any issue, please search for existing issues and read the Issue Guidelines, written by Nicolas Gallagher. After that if you find a bug or would like to make feature request, please open a new issue.

Please report documentation issues in the documentation project.

Development

Read Developing Less.

Release History

See the changelog

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Matthew Dean
Matthew Dean

💻 📖 🚧 📆
Alexis Sellier
Alexis Sellier

💻 📖
Luke Page
Luke Page

💻
Max Mikhailov
Max Mikhailov

💻
Lei Chen
Lei Chen

💻 🐛 📖
Daniel Puckowski
Daniel Puckowski

💻 🐛
Add your contributions

License

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

less.js (less/less.js)

Searching Database…

What is this?Less is a dynamic stylesheet language that extends CSS with variables, mixins, nesting and functions, and Less.js is its official compiler written in JavaScript; this repo is the Less.js monorepo.
So I write .less files and get CSS back — how does it ship?Everything lives in one project: you write .less files, and Less.js compiles them into plain CSS. It ships as an npm package you can drive from the command line or call as a JavaScript library, with the compiler itself in the packages/less package of this monorepo.
How do I get it compiling my styles?Install the compiler with npm (npm install -g less) and run lessc styles.less styles.css; you can also drop less.js into a page and let it compile styles in the browser. Usage and configuration options are documented at lesscss.org.
What do I need on my machine before it will run?Just Node.js and npm — Less.js is written in JavaScript, with no Python, native builds or other runtimes required. The in-browser flavor needs nothing but a script tag.
Should I compile styles in the browser or in a build step?Browser-side compilation is a real mode, but every page load then ships the compiler and transforms styles at runtime, so production projects precompile .less to .css during the build instead. Note also that the repo readme is contributor-facing; day-to-day usage lives at lesscss.org.
Why would a web developer pick Less over plain CSS today?For authoring superpowers with standard CSS as the output: variables, mixins, nesting and functions on top of syntax you already know, and since Less is backwards-compatible with CSS your existing stylesheets work as-is.
Does the compiler run on Windows and macOS, or is it a Linux-only thing?It is a plain npm package, so it runs wherever Node.js runs — Windows, macOS and Linux alike — and the browser mode works in any modern browser regardless of OS.
Am I allowed to use it in commercial projects?Yes — Less.js is distributed under the Apache License (Apache-2.0), which permits commercial and closed-source use as long as the license notice is kept.
What does Less add on top of CSS?Variables, mixins (reusable blocks of declarations), nested rules, operators and built-in functions for color and math — all compiled away by Less.js, so browsers only ever see standard CSS.
How does Less compare to Sass?Both are mature CSS preprocessors. Less stays closest to plain CSS syntax and is written in JavaScript, which is why it can run both in Node builds and directly in the browser; Sass brings its own feature set and tooling.
What is inside this monorepo?The main compiler package in packages/less with its own test suite (npm test), ESLint linting and scripts for publishing releases. The language documentation lives separately at lesscss.org.
Is Less still actively maintained?Yes — it has been developed since February 2010, holds around 17,000 stars, and the repo shows current activity: copyright notices through 2025, GitHub Actions workflows for CI and publishing, and a maintained changelog.
Creator
less
Size
17.7 MB
Stars
17K
Age
16y
Commits · 90 Days