cssesc
— escape
text for use in CSS string literals or identifiers
cssesc |
[-i | --identifier
string]
[-s | --single-quotes
string]
[-d | --double-quotes
string]
[-w | --wrap
string]
[-e | --escape-everything
string]
[-v | --version ]
[-h | --help ] |
cssesc
escapes strings for use in CSS
string literals or identifiers while generating the shortest possible valid
ASCII-only output.
- -s,
--single-quotes
- Escape any occurences of ' in the input string as \', so that the output
can be used in a CSS string literal wrapped in single quotes.
- -d,
--double-quotes
- Escape any occurences of " in the input string as \", so that
the output can be used in a CSS string literal wrapped in double
quotes.
- -w,
--wrap
- Make sure the output is a valid CSS string literal wrapped in quotes. The
type of quotes can be specified using the -s |
--single-quotes or -d |
--double-quotes settings.
- -e,
--escape-everything
- Escape all the symbols in the output, even printable ASCII symbols.
- -v,
--version
- Print cssesc's version.
- -h,
--help
- Show the help screen.
The cssesc
utility exits with one of the
following values:
0
cssesc
successfully escaped the given text and
printed the result.
1
cssesc
wasn't instructed to escape anything (for
example, the --help flag was set); or, an error
occurred.
cssesc's bug tracker is located at
<https://github.com/mathiasbynens/cssesc/issues>.
Mathias Bynens <https://mathiasbynens.be/>