Socket
Socket
Sign inDemoInstall

less

Package Overview
Dependencies
58
Maintainers
7
Versions
130
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    less

Leaner CSS


Version published
Weekly downloads
4.6M
decreased by-18.28%
Maintainers
7
Install size
8.50 MB
Created
Weekly downloads
 

Package description

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

Changelog

Source

v3.10.0 (2019-08-17)

  • #3413 Release v3.10.0 (#3413) (@matthew-dean)

Readme

Source

optionalDependency Status Twitter Follow


Chat with Less.js users and contributors

Sauce Test Status

Less.js

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

This is the JavaScript, official, stable version of Less.

Getting Started

Options for adding Less.js to your project:

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

License

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

Keywords

FAQs

Last updated on 17 Aug 2019

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc