main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | # `CSS.escape` polyfill [](https://travis-ci.org/mathiasbynens/CSS.escape) [](https://coveralls.io/r/mathiasbynens/CSS.escape)
|
---|
2 |
|
---|
3 | A robust polyfill for [the `CSS.escape` utility method as defined in CSSOM](https://drafts.csswg.org/cssom/#the-css.escape%28%29-method).
|
---|
4 |
|
---|
5 | For a more powerful alternative, consider using [cssesc](https://mths.be/cssesc), which automatically takes care of excessive whitespace, and has many options to customize the output.
|
---|
6 |
|
---|
7 | ## Installation
|
---|
8 |
|
---|
9 | In a browser:
|
---|
10 |
|
---|
11 | ```html
|
---|
12 | <script src="css.escape.js"></script>
|
---|
13 | ```
|
---|
14 |
|
---|
15 | Via [npm](https://www.npmjs.com/):
|
---|
16 |
|
---|
17 | ```bash
|
---|
18 | npm install css.escape
|
---|
19 | ```
|
---|
20 |
|
---|
21 | Then, in [Node.js](https://nodejs.org/):
|
---|
22 |
|
---|
23 | ```js
|
---|
24 | require('css.escape');
|
---|
25 |
|
---|
26 | // On Windows and on Mac systems with default settings, case doesn’t matter,
|
---|
27 | // which allows you to do this instead:
|
---|
28 | require('CSS.escape');
|
---|
29 | ```
|
---|
30 |
|
---|
31 | ## Author
|
---|
32 |
|
---|
33 | | [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
---|
34 | |---|
|
---|
35 | | [Mathias Bynens](https://mathiasbynens.be/) |
|
---|
36 |
|
---|
37 | ## License
|
---|
38 |
|
---|
39 | This polyfill is available under the [MIT](https://mths.be/mit) license.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.