css-what
css-what copied to clipboard
fix: escape slash, comma and semicolon char when stringify name
add slash, comma and semicolon char in charsToEscapeInName to support class like:
import { stringify, parse } from 'css-what';
const selector = parse('.before\\:bottom-1\\/2, .bg-\\[hsl\\(227\\,91\\%\\,65\\%\\)\\;\\]');
console.log(stringify(selector)); // .before\:bottom-1\/2, .bg-\[hsl\(227\,91\%\,65\%\)\;\]
Thanks a lot @kainstar! Could you also add a test case? (The example you gave in the PR description would suffice.)