A robust polyfill that implements the CSS.escape utility method as defined in CSSOM, useful when you need consistent escaping behavior for CSS identifiers in environments that may not support it. It can be used in the browser or installed via npm, and is accompanied by a link to a more configurable alternative (cssesc).
Project status
- Maintenance status: The repo appears dormant, with the last upstream push on 2022-09-09 and the most recent tagged update (per provided list) from 2016-08-23, so there is little evidence of active maintenance today (2026-09-10).
- Update cadence: Historical updates exist, but they are infrequent and long-separated (not continuous), with a large gap from 2016 to the last push in 2022, and no evidence of recent feature or behavior evolution since then.
AI summary generated
Recent updates
v1.5.1
This release bumps css.escape from v1.5.0 to v1.5.1 and updates the runtime behavior of CSS.escape when called incorrectly. Release notes were not provided, so behavior changes must be inferred from the code diff and updated tests.
v1.5.0
Release v1.5.0 provides a small update to the css.escape polyfill. The only functional code change visible in the diff is within the UMD/AMD wrapper, and the rest is version metadata plus added test assertions around U+FFFD escaping behavior.
v1.4.0
Release v1.4.0 was published on 2015-12-03, but no release notes were provided by the publisher. As a result, there is no documented information here about new features, breaking changes, bug fixes, security fixes, or dependency updates.
v1.3.0
Release notes for v1.3.0 are not provided. The code diff shows this version bumps css.escape to 1.3.0, adding a UMD-style wrapper for module systems and changing the escaping output format for the NULL character case.
Breakingv1.2.0
Release v1.2.0 updates the css.escape polyfill implementation and associated tests. The primary functional change is how CSS.escape handles the NUL character (U+0000), and the dev tooling dependencies were also bumped.
v1.1.0
This release bumps the css.escape polyfill version from 1.0.0 to 1.1.0 and updates inline documentation links to the current CSSOM drafts URLs. The main code change alters the CSS escaping behavior for the specific input string "--". Release notes are not provided, so the behavioral change below is only detectable from the code diff and updated tests.
Breakingv1.0.0
Release v1.0.0 updates the CSS.escape polyfill implementation and its test suite. The code change specifically adjusts how hyphens ('-') are escaped at string boundaries to better match the CSSOM escape rules. No release notes were provided, so the changes below are only inferred from the actual diff.
Breakingv0.2.1
Release v0.2.1 updates the CSS.escape polyfill implementation to throw a more specific error type when the input contains the NULL character U+0000. The release notes section is empty, so the behavioral change is not documented. The release also adds CI code coverage publishing (coveralls) and adjusts README/package metadata and test assertions.
v0.2.0
Release v0.2.0 was published on 2014-04-30. The publisher did not include any release notes, so changes, compatibility impacts, and fixes are not documented here.