always link
This commit is contained in:
parent
d5fe0e53d8
commit
a73c99f7fa
1 changed files with 1 additions and 9 deletions
|
|
@ -19,15 +19,7 @@ export const createStyleSheet = (id) => {
|
|||
}
|
||||
}
|
||||
|
||||
let el = document.getElementById(id)
|
||||
if (!el?.sheet) {
|
||||
el = document.getElementById(id + '-link')
|
||||
}
|
||||
try {
|
||||
el.sheet.insertRule(':root { padding: initial }')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
const el = document.getElementById(id + '-link')
|
||||
// Clear all rules in it
|
||||
for (let i = el.sheet.cssRules.length - 1; i >= 0; --i) {
|
||||
el.sheet.deleteRule(i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue