You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

less

Package Overview
Dependencies
Maintainers
5
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less

Leaner CSS

latest
Source
npmnpm
Version
4.6.4
Version published
Weekly downloads
4.3M
-47.5%
Maintainers
5
Weekly downloads
 
Created
Source

Less.js logo

Github Actions CI Downloads npm version

Less.js

The dynamic stylesheet language. lesscss.org

Less extends CSS with variables, mixins, functions, nesting, and more — then compiles to standard CSS. Write cleaner stylesheets with less code.

@primary: #4a90d9;

.button {
  color: @primary;
  &:hover {
    color: darken(@primary, 10%);
  }
}

Install

npm install less

Usage

Node.js

import less from 'less';

const output = await less.render('.class { width: (1 + 1) }');
console.log(output.css);

Command Line

npx lessc styles.less styles.css

Browser

<link rel="stylesheet/less" type="text/css" href="styles.less" />
<script src="https://cdn.jsdelivr.net/npm/less"></script>

Why Less?

  • Variables — define reusable values once
  • Mixins — reuse groups of declarations across rulesets
  • Nesting — mirror HTML structure in your stylesheets
  • Functions — transform colors, manipulate strings, do math
  • Imports — split stylesheets into manageable pieces
  • Extend — reduce output size by combining selectors

Documentation

Full documentation, usage guides, and configuration options at lesscss.org.

Contributing

Less.js is open source. Report bugs, submit pull requests, or help improve the documentation.

See CONTRIBUTING.md for development setup.

License

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

Keywords

compile less

FAQs

Package last updated on 13 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts