Skip to content

Commit d619e34

Browse files
JoyceBabujonathantneal
authored andcommitted
Added details on using with postcss-scss syntax
1 parent 97c90c5 commit d619e34

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,25 @@ postcss([
6161
]).process(YOUR_CSS);
6262
```
6363

64+
The standard CSS parser included with PostCSS may not be able to parse SCSS
65+
specific features like inline comments. To accurately parse SCSS, use
66+
the [SCSS Parser].
67+
68+
```bash
69+
npm install postcss-scss --save-dev
70+
```
71+
72+
```js
73+
const postcss = require('postcss');
74+
const postcssSass = require('@csstools/postcss-sass');
75+
76+
postcss([
77+
postcssSass(/* pluginOptions */)
78+
]).process(YOUR_CSS, {
79+
syntax: 'postcss-scss'
80+
});
81+
```
82+
6483
#### Gulp
6584

6685
Add [Gulp PostCSS] to your build tool:
@@ -135,3 +154,4 @@ not include `file`, `outFile`, `data`, `importer`, `omitSourceMapUrl`,
135154
[PostCSS]: https://github.com/postcss/postcss
136155
[PostCSS Sass]: https://github.com/jonathantneal/postcss-sass
137156
[Sass]: https://github.com/sass/node-sass
157+
[SCSS Parser]: https://github.com/postcss/postcss-scss

0 commit comments

Comments
 (0)