Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

less

Package Overview
Dependencies
Maintainers
5
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less

Leaner CSS

  • 4.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.3M
increased by1.98%
Maintainers
5
Weekly downloads
 
Created

What is less?

The 'less' npm package is a pre-processor for CSS, which extends the capabilities of CSS with dynamic behavior such as variables, mixins, operations, and functions. It allows developers to write CSS in a more maintainable and extendable way.

What are less's main functionalities?

Variables

Variables allow you to specify widely used values in a single place, and then reuse them throughout the stylesheet, making your CSS more maintainable.

@primary-color: #4D9FEC;

a {
  color: @primary-color;
}

Mixins

Mixins allow you to embed all the properties of a class into another class by simply including the class name as one of its properties. It's like variables, but for whole classes.

.bordered {
  border-top: dotted 1px black;
  border-bottom: solid 2px black;
}

#menu a {
  .bordered;
}

Nested Rules

Nested rules make it possible to nest selectors inside other selectors. This makes the structure of your CSS mirror the structure of your HTML.

#header {
  color: black;
  .navigation {
    font-size: 12px;
  }
  .logo {
    width: 300px;
  }
}

Functions & Operations

Functions and operations let you manipulate numbers and colors, doing math with them and applying functions to achieve dynamic results.

@base: 5%;

.padding {
  padding: @base * 2;
}

Other packages similar to less

Keywords

FAQs

Package last updated on 25 Nov 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc