postcss-pseudo-classes icon indicating copy to clipboard operation
postcss-pseudo-classes copied to clipboard

Preserve css pseudo class functions

Open philippone opened this issue 5 years ago • 0 comments

Hello,

I would like to preserve css pseudo class functions like :host() but currently all pseudo class functions are escaped.

Example:

:host(.selector) {...}

:host(:active) {...}

is resolved to:

:host(.selector),
// `host` is in blacklist: last parenthesis is escaped
:host(.selector\) {...}
// `host` not in blacklist:
./:host\(.selector\) {...}

:host(:active),
.\:host\(.\:active\) {...}

I need the following output:

// function remains unchanged
:host(.selector) {...}

:host(:active),
// function remains unchanged, only pseudo state is resolved
:host(.\:active) {...}

philippone avatar Aug 18 '20 11:08 philippone