mirror of
https://github.com/MercuryWorkshop/dreamlandjs.git
synced 2025-05-15 15:10:02 -04:00
hopefully fix css hang
This commit is contained in:
parent
90d7cf7f85
commit
bd347052e9
2 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,8 @@ export function css(strings, ...values) {
|
||||||
let newstr = ''
|
let newstr = ''
|
||||||
let selfstr = ''
|
let selfstr = ''
|
||||||
while (!styleElement.sheet.cssRules.length) {
|
while (!styleElement.sheet.cssRules.length) {
|
||||||
let [first, ...rest] = str.split('\n')
|
let [first, ...rest] = str.split('\n');
|
||||||
|
if (!first) break;
|
||||||
selfstr += first + '\n'
|
selfstr += first + '\n'
|
||||||
str = rest.join('\n')
|
str = rest.join('\n')
|
||||||
styleElement.textContent = str
|
styleElement.textContent = str
|
||||||
|
@ -36,7 +37,6 @@ export function css(strings, ...values) {
|
||||||
}
|
}
|
||||||
|
|
||||||
styleElement.textContent = `.${uid} {${selfstr}}` + '\n' + newstr
|
styleElement.textContent = `.${uid} {${selfstr}}` + '\n' + newstr
|
||||||
console.log(styleElement.textContent)
|
|
||||||
|
|
||||||
cssmap[str] = uid
|
cssmap[str] = uid
|
||||||
return uid
|
return uid
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
|
|
||||||
"noUncheckedIndexedAccess": true
|
"noUncheckedIndexedAccess": true
|
||||||
},
|
},
|
||||||
"include": ["./examples/*.ts", "./examples/*.tsx", "./DreamlandJS.d.ts"],
|
"include": ["./examples/*.ts", "./examples/*.tsx", "./dreamland.d.ts"],
|
||||||
"exclude": ["node_modules/**/*"]
|
"exclude": ["node_modules/**/*"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue