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

postcss-less

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-less

LESS parser for PostCSS

  • 6.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
increased by1.92%
Maintainers
1
Weekly downloads
 
Created

What is postcss-less?

The postcss-less npm package is a tool that allows you to parse LESS syntax with PostCSS, enabling you to use PostCSS plugins with LESS files. It is a syntax plugin for PostCSS, a tool for transforming styles with JavaScript plugins.

What are postcss-less's main functionalities?

Parsing LESS Syntax

This feature allows you to parse LESS files using PostCSS by specifying the postcss-less syntax. This is useful for applying PostCSS plugins to LESS files.

const postcss = require('postcss');
const postcssLess = require('postcss-less');

postcss().process(lessCode, { syntax: postcssLess }).then(result => {
  console.log(result.css);
});

Stringifying LESS

This feature enables you to convert a PostCSS AST (Abstract Syntax Tree) back into a LESS string. This is useful when you want to generate LESS code after manipulating the AST.

const postcss = require('postcss');
const postcssLess = require('postcss-less');

const root = postcss.parse(lessCode, { syntax: postcssLess });
const less = root.toString(postcssLess);

Other packages similar to postcss-less

Keywords

FAQs

Package last updated on 07 Jan 2022

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