.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / postcss-scss / README.md
1 # PostCSS SCSS Syntax [![Build Status][ci-img]][ci]
2
3 <img align="right" width="95" height="95"
4      title="Philosopher’s stone, logo of PostCSS"
5      src="http://postcss.github.io/postcss/logo.svg">
6
7 A [SCSS] parser for [PostCSS].
8
9 **This module does not compile SCSS.** It simply parses mixins as custom
10 at-rules & variables as properties, so that PostCSS plugins can then transform
11 SCSS source code alongside CSS.
12
13 [PostCSS]: https://github.com/postcss/postcss
14 [ci-img]:  https://img.shields.io/travis/postcss/postcss-scss.svg
15 [SCSS]:    http://sass-lang.com/
16 [ci]:      https://travis-ci.org/postcss/postcss-scss
17
18 <a href="https://evilmartians.com/?utm_source=postcss">
19 <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
20 </a>
21
22
23 ## Install
24
25 ```sh
26 npm --save install postcss-scss
27 ```
28
29 or (if you use [Yarn](https://yarnpkg.com/))
30
31 ```sh
32 yarn add --dev postcss-scss
33 ```
34
35
36 ## Usage
37
38 There are two ways to use this parser:
39
40 ### 1. SCSS Transformations
41
42 The main use case of this plugin is to apply PostCSS transformations directly
43 to SCSS source code.
44
45 For example, you can lint SCSS source with [Stylelint]
46 and linter will automatically fix issues in the source.
47
48 ```js
49 // postcss.config.js
50 module.exports = {
51   syntax: 'postcss-scss',
52   plugins: {
53     …
54   }
55 }
56 ```
57
58 [Stylelint]:    http://stylelint.io/
59
60
61 ### 2. Inline Comments for PostCSS
62
63 Also you can use this parser just to add `//` single-line comment
64 to your PostCSS project (without any Sass):
65
66 ```scss
67 :root {
68     // Main theme color
69     --color: red;
70 }
71 ```
72
73 Note that you don’t need a special stringifier to handle the output; the default
74 one will automatically convert single line comments into block comments.
75
76 ```js
77 // postcss.config.js
78 module.exports = {
79   parser: 'postcss-scss',
80   plugins: {
81     …
82   }
83 }
84 ```
85
86 If you want Sass behaviour with removing inline comments, you can use
87 [postcss-strip-inline-comments] plugin.
88
89 [postcss-strip-inline-comments]: https://github.com/mummybot/postcss-strip-inline-comments