Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1004 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | # [postcss][postcss]-normalize-string
|
---|
| 2 |
|
---|
| 3 | > Normalize strings with PostCSS.
|
---|
| 4 |
|
---|
| 5 | ## Install
|
---|
| 6 |
|
---|
| 7 | With [npm](https://npmjs.org/package/postcss-normalize-string) do:
|
---|
| 8 |
|
---|
| 9 | ```
|
---|
| 10 | npm install postcss-normalize-string --save
|
---|
| 11 | ```
|
---|
| 12 |
|
---|
| 13 | ## Example
|
---|
| 14 |
|
---|
| 15 | ### Input
|
---|
| 16 |
|
---|
| 17 | ```css
|
---|
| 18 | p:after{ content: '\\'string\\' is intact' }
|
---|
| 19 | ```
|
---|
| 20 |
|
---|
| 21 | ### Output
|
---|
| 22 |
|
---|
| 23 | ```css
|
---|
| 24 | p:after{ content:"'string' is intact" }
|
---|
| 25 | ```
|
---|
| 26 |
|
---|
| 27 | ## Usage
|
---|
| 28 |
|
---|
| 29 | See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
---|
| 30 | examples for your environment.
|
---|
| 31 |
|
---|
| 32 | ## API
|
---|
| 33 |
|
---|
| 34 | ### normalize([options])
|
---|
| 35 |
|
---|
| 36 | #### options
|
---|
| 37 |
|
---|
| 38 | ##### preferredQuote
|
---|
| 39 |
|
---|
| 40 | Type: `string`
|
---|
| 41 | Default: `double`
|
---|
| 42 |
|
---|
| 43 | Sets what type of quote to prefer. Possible values are `single` and `double`.
|
---|
| 44 |
|
---|
| 45 | ```js
|
---|
| 46 | var css = 'p:after{content:""}';
|
---|
| 47 | console.log(postcss(normalize({preferredQuote: 'single'})).process(css).css);
|
---|
| 48 | //=> p:after{content:''}
|
---|
| 49 | ```
|
---|
| 50 |
|
---|
| 51 | ## Contributors
|
---|
| 52 |
|
---|
| 53 | See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
---|
| 54 |
|
---|
| 55 | ## License
|
---|
| 56 |
|
---|
| 57 | MIT © [Ben Briggs](http://beneb.info)
|
---|
| 58 |
|
---|
| 59 | [postcss]: https://github.com/postcss/postcss
|
---|
Note:
See
TracBrowser
for help on using the repository browser.