mirror of
https://github.com/MercuryWorkshop/dreamlandjs.git
synced 2025-05-15 07:10:00 -04:00
delete examples/
This commit is contained in:
parent
4fff09eebf
commit
aa07178e8b
4 changed files with 2 additions and 175 deletions
|
@ -23,23 +23,21 @@ export function css(strings, ...values) {
|
|||
let selfstr = ''
|
||||
|
||||
// compat layer for older browsers. when css nesting stablizes this can be removed
|
||||
for (; ;) {
|
||||
for (;;) {
|
||||
let [first, ...rest] = str.split('\n')
|
||||
if (first.trim().endsWith('{')) break;
|
||||
if (first.trim().endsWith('{')) break
|
||||
|
||||
selfstr += first + '\n'
|
||||
str = rest.join('\n')
|
||||
}
|
||||
styleElement.textContent = str
|
||||
|
||||
|
||||
for (const rule of styleElement.sheet.cssRules) {
|
||||
rule.selectorText = `.${uid} ${rule.selectorText}`
|
||||
newstr += rule.cssText + '\n'
|
||||
}
|
||||
|
||||
styleElement.textContent = `.${uid} {${selfstr}}` + '\n' + newstr
|
||||
console.log(styleElement.textContent)
|
||||
|
||||
cssmap[str] = uid
|
||||
return uid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue