fix: don't generate invalid css classnames

This commit is contained in:
CoolElectronics 2024-04-27 09:48:34 -04:00
parent d984e35e35
commit 699afaca52
No known key found for this signature in database
GPG key ID: F63593D168636C50
2 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@ const csstag = (scoped) =>
str += f + (values.shift() || '')
}
return genCss(genuid(), str, scoped)
return genCss('dl' + genuid(), str, scoped)
}
export const css = csstag(false)
@ -61,7 +61,7 @@ function parseCombinedCss(str) {
// compat layer for older browsers. when css nesting stablizes this can be removed
str += '\n'
for (; ;) {
for (;;) {
let [first, ...rest] = str.split('\n')
if (first.trim().endsWith('{')) break