cleanup
This commit is contained in:
parent
3081504c64
commit
d6ebc5049e
1 changed files with 4 additions and 4 deletions
|
|
@ -115,8 +115,8 @@ export const tryLoadCache = async () => {
|
||||||
const eagerStyles = createStyleSheet(EAGER_STYLE_ID)
|
const eagerStyles = createStyleSheet(EAGER_STYLE_ID)
|
||||||
const lazyStyles = createStyleSheet(LAZY_STYLE_ID)
|
const lazyStyles = createStyleSheet(LAZY_STYLE_ID)
|
||||||
|
|
||||||
cache.data[0].forEach(rule => eagerStyles.addRule(rule, 'index-max'))
|
cache.data[0].forEach(rule => eagerStyles.addRule(rule))
|
||||||
cache.data[1].forEach(rule => lazyStyles.addRule(rule, 'index-max'))
|
cache.data[1].forEach(rule => lazyStyles.addRule(rule))
|
||||||
|
|
||||||
eagerStyles.ready = true
|
eagerStyles.ready = true
|
||||||
lazyStyles.ready = true
|
lazyStyles.ready = true
|
||||||
|
|
@ -234,13 +234,13 @@ export const applyConfig = (input) => {
|
||||||
|
|
||||||
const styleSheet = createStyleSheet('theme-holder')
|
const styleSheet = createStyleSheet('theme-holder')
|
||||||
|
|
||||||
styleSheet.addRule(`:root { ${rules} }`, 'index-max')
|
styleSheet.addRule(`:root { ${rules} }`)
|
||||||
|
|
||||||
// TODO find a way to make this not apply to theme previews
|
// TODO find a way to make this not apply to theme previews
|
||||||
if (Object.prototype.hasOwnProperty.call(config, 'forcedRoundness')) {
|
if (Object.prototype.hasOwnProperty.call(config, 'forcedRoundness')) {
|
||||||
styleSheet.addRule(` *:not(.preview-block) {
|
styleSheet.addRule(` *:not(.preview-block) {
|
||||||
--roundness: var(--forcedRoundness) !important;
|
--roundness: var(--forcedRoundness) !important;
|
||||||
}`, 'index-max')
|
}`)
|
||||||
}
|
}
|
||||||
styleSheet.ready = true
|
styleSheet.ready = true
|
||||||
adoptStyleSheets()
|
adoptStyleSheets()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue