https://github.com/mathiasbynens/css.escape
A robust polyfill for the CSS.escape utility method as defined in CSSOM.
https://github.com/mathiasbynens/css.escape
Last synced: about 2 months ago
JSON representation
A robust polyfill for the CSS.escape utility method as defined in CSSOM.
- Host: GitHub
- URL: https://github.com/mathiasbynens/css.escape
- Owner: mathiasbynens
- License: mit
- Created: 2013-10-15T16:25:44.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-09-09T22:27:33.000Z (over 2 years ago)
- Last Synced: 2025-03-30T12:34:25.843Z (2 months ago)
- Language: JavaScript
- Homepage: https://mths.be/cssescape
- Size: 22.5 KB
- Stars: 493
- Watchers: 8
- Forks: 26
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT.txt
Awesome Lists containing this project
README
# `CSS.escape` polyfill [](https://travis-ci.org/mathiasbynens/CSS.escape) [](https://coveralls.io/r/mathiasbynens/CSS.escape)
A robust polyfill for [the `CSS.escape` utility method as defined in CSSOM](https://drafts.csswg.org/cssom/#the-css.escape%28%29-method).
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.
## Installation
In a browser:
```html
```
Via [npm](https://www.npmjs.com/):
```bash
npm install css.escape
```Then, in [Node.js](https://nodejs.org/):
```js
require('css.escape');
```## Author
| [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](https://mathiasbynens.be/) |## License
This polyfill is available under the [MIT](https://mths.be/mit) license.