Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | # [postcss][postcss]-normalize-url
|
---|
2 |
|
---|
3 | > [Normalize URLs](https://github.com/sindresorhus/normalize-url) with PostCSS.
|
---|
4 |
|
---|
5 | ## Install
|
---|
6 |
|
---|
7 | With [npm](https://npmjs.org/package/postcss-normalize-url) do:
|
---|
8 |
|
---|
9 | ```
|
---|
10 | npm install postcss-normalize-url --save
|
---|
11 | ```
|
---|
12 |
|
---|
13 | ## Example
|
---|
14 |
|
---|
15 | ### Input
|
---|
16 |
|
---|
17 | ```css
|
---|
18 | h1 {
|
---|
19 | background: url("http://site.com:80/image.jpg")
|
---|
20 | }
|
---|
21 | ```
|
---|
22 |
|
---|
23 | ### Output
|
---|
24 |
|
---|
25 | ```css
|
---|
26 | h1 {
|
---|
27 | background: url(http://site.com/image.jpg)
|
---|
28 | }
|
---|
29 | ```
|
---|
30 |
|
---|
31 | Note that this module will also try to normalize relative URLs, and is capable
|
---|
32 | of stripping unnecessary quotes. For more examples, see the [tests](test.js).
|
---|
33 |
|
---|
34 | ## Usage
|
---|
35 |
|
---|
36 | See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
---|
37 | examples for your environment.
|
---|
38 |
|
---|
39 | ## API
|
---|
40 |
|
---|
41 | ### normalize([options])
|
---|
42 |
|
---|
43 | Please see the [normalize-url documentation][docs]. By default,
|
---|
44 | `normalizeProtocol`, `stripHash` & `stripWWW` are set to `false`.
|
---|
45 |
|
---|
46 | ## Contributors
|
---|
47 |
|
---|
48 | See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
---|
49 |
|
---|
50 | ## License
|
---|
51 |
|
---|
52 | MIT © [Ben Briggs](http://beneb.info)
|
---|
53 |
|
---|
54 | [docs]: https://github.com/sindresorhus/normalize-url#options
|
---|
55 | [postcss]: https://github.com/postcss/postcss
|
---|
Note:
See
TracBrowser
for help on using the repository browser.