Less adds variables, mixins, nesting, and functions to CSS, compiled by Less.js on Node.js or in supporting browsers.
Overview
Less (Leaner Style Sheets) is a backwards-compatible language extension for CSS. Syntax closely resembles CSS while adding variables, parametric mixins, nested rules, operations, built-in functions, maps, and import composition so authors can organize styles more compactly than with plain CSS alone.
Less.js is the JavaScript compiler that turns Less sources into CSS. It runs on the server with Node.js or Rhino, or in the browser on modern clients, as described in the official documentation. Features include parent-selector ampersand forms, bubbling nested at-rules such as media queries, escaping for arbitrary values, and controlled math behavior including calc() compatibility rules in recent major versions.
The tracked repository is the Less.js monorepo; language reference, configuration, and usage guides live on the project documentation site. Third-party build tools and editor integrations are listed separately for teams adopting Less in larger front-end pipelines.
Key features
- CSS variables and mixins
- Nested selectors and at-rules
- Color and math functions
- Map-style mixin namespaces
- Importable partial stylesheets
- Server-side Node compilation
- In-browser compilation option
- Lazy-loaded variables and mixins
Use cases
- Maintainable stylesheet authoring
- Shared theme variables across sites
- Build-time CSS generation
- Legacy projects using Less syntax
- Component-scoped style organization