mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-29 05:34:21 +08:00
The CSS minifier we currently use (clean-css) is not maintained and lacks support for new CSS features. CSSNano is a replacement that supports features we need (primarily container queries). This CL only adds the relevant dependencies, and does not use it. I will do that (and remove clean-css) in a follow-up. Bug: 1399763 Change-Id: I899ecc4482164404dd5ac2fd13f92fb797978e29 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092305 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
60 lines
1004 B
Markdown
60 lines
1004 B
Markdown
# [postcss][postcss]-normalize-string
|
|
|
|
> Normalize strings with PostCSS.
|
|
|
|
## Install
|
|
|
|
With [npm](https://npmjs.org/package/postcss-normalize-string) do:
|
|
|
|
```
|
|
npm install postcss-normalize-string --save
|
|
```
|
|
|
|
## Example
|
|
|
|
### Input
|
|
|
|
```css
|
|
p:after{ content: '\\'string\\' is intact' }
|
|
```
|
|
|
|
### Output
|
|
|
|
```css
|
|
p:after{ content:"'string' is intact" }
|
|
```
|
|
|
|
## Usage
|
|
|
|
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
|
examples for your environment.
|
|
|
|
## API
|
|
|
|
### normalize([options])
|
|
|
|
#### options
|
|
|
|
##### preferredQuote
|
|
|
|
Type: `string`
|
|
Default: `double`
|
|
|
|
Sets what type of quote to prefer. Possible values are `single` and `double`.
|
|
|
|
```js
|
|
var css = 'p:after{content:""}';
|
|
console.log(postcss(normalize({preferredQuote: 'single'})).process(css).css);
|
|
//=> p:after{content:''}
|
|
```
|
|
|
|
## Contributors
|
|
|
|
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
|
|
|
## License
|
|
|
|
MIT © [Ben Briggs](http://beneb.info)
|
|
|
|
[postcss]: https://github.com/postcss/postcss
|