Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

postcss-escape-generated-content-string

niksy338MIT3.0.0

PostCSS plugin for escaping strings in generated content.

content, emoji, encode, escape, generated, postcss, unicode

readme

postcss-escape-generated-content-string

Build Status

PostCSS plugin for escaping strings in generated content.

Features:

  • Handles every character (emojis included)
  • Already escaped characters are left untouched

Install

npm install postcss postcss-escape-generated-content-string --save

Usage

import postcss from 'postcss';
import plugin from 'postcss-escape-generated-content-string';

postcss([plugin()]);
/* Before */

.becky {
    content: 'becky 🐕';
}

/* After */

.becky {
    content: '\0062\0065\0063\006b\0079\0020\1f415';
}

License

MIT © Ivan Nikolić

changelog

Changelog

Unreleased

3.0.0 - 2020-10-20

Changed

  • Properly export plugin function (reference)

2.0.0 - 2020-10-07

Added

  • Support for PostCSS 8

1.0.0 - 2020-06-09

Added

  • Initial implementation