Switch from css.escape to cssesc

This is what postcss-selector-parser uses internally, best to rely on the same escaping logic everywhere.
This commit is contained in:
Adam Wathan 2019-02-27 13:53:28 -05:00
parent b8f1078229
commit 2f79cab8fa
3 changed files with 3 additions and 8 deletions

View file

@ -1,5 +1,5 @@
import escape from 'css.escape'
import cssesc from 'cssesc'
export default function escapeClassName(className) {
return escape(className)
return cssesc(className, { isIdentifier: true })
}