You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# PostCSS LESS Syntax [](https://travis-ci.org/shellscape/postcss-less)[](https://www.npmjs.com/package/postcss-less)
16
+
# postcss-less
8
17
9
-
[PostCSS] Syntax for parsing [LESS]
18
+
[![tests][tests]][tests-url]
19
+
[![cover][cover]][cover-url]
20
+
[![size][size]][size-url]
10
21
11
-
<img align="right" width="95" height="95"
12
-
title="Philosopher's stone, logo of PostCSS"
13
-
src="http://postcss.github.io/postcss/logo.svg">
22
+
A [PostCSS] Syntax for parsing [LESS]
14
23
15
-
Please note: poscss-less is not a LESS compiler. For compiling LESS, please use
16
-
the official toolset for LESS.
24
+
_Note: This module requires Node v6.14.4+. `poscss-less` is not a LESS compiler. For compiling LESS, please use the official toolset for LESS._
17
25
18
-
## Getting Started
26
+
## Install
19
27
20
-
First thing's first, install the module:
28
+
Using npm:
21
29
22
-
```
30
+
```console
23
31
npm install postcss-less --save-dev
24
32
```
25
33
26
-
## LESS Transformations
34
+
Using yarn:
35
+
36
+
```console
37
+
yarn add postcss-less --dev
38
+
```
27
39
28
-
The most common use of `postcss-less` is for applying PostCSS transformations
29
-
directly to LESS source. eg. ia theme written in LESS which uses [Autoprefixer]
30
-
to add appropriate vendor prefixes.
40
+
## Usage
41
+
42
+
The most common use of `postcss-less` is for applying PostCSS transformations directly to LESS source. eg. ia theme written in LESS which uses [Autoprefixer]to add appropriate vendor prefixes.
31
43
32
44
```js
33
45
constsyntax=require('postcss-less');
@@ -38,174 +50,74 @@ postcss(plugins)
38
50
});
39
51
```
40
52
41
-
## Inline Comments
42
-
43
-
Parsing of single-line comments in CSS is also supported.
44
-
45
-
```less
46
-
:root {
47
-
// Main theme color
48
-
--color: red;
49
-
}
50
-
```
51
-
52
-
Note that you don't need a custom stringifier to handle the output; the default
53
-
stringifier will automatically convert single line comments into block comments.
54
-
If you need to support inline comments, please use a [custom PostCSSLess stringifier](#stringifier).
0 commit comments