mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Remove dependency on cssesc
Makes it easier to guarantee that our escape behavior stays in line with postcss-selector-parser if their internal implementation ever changes.
This commit is contained in:
parent
2f79cab8fa
commit
5e935c10f7
@ -44,7 +44,6 @@
|
||||
"autoprefixer": "^9.4.5",
|
||||
"bytes": "^3.0.0",
|
||||
"chalk": "^2.4.1",
|
||||
"cssesc": "^3.0.0",
|
||||
"fs-extra": "^4.0.2",
|
||||
"lodash": "^4.17.11",
|
||||
"node-emoji": "^1.8.1",
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import cssesc from 'cssesc'
|
||||
import parser from 'postcss-selector-parser'
|
||||
import get from 'lodash/get'
|
||||
|
||||
export default function escapeClassName(className) {
|
||||
return cssesc(className, { isIdentifier: true })
|
||||
const node = parser.className()
|
||||
node.value = className
|
||||
return get(node, 'raws.value', node.value)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user