theme previews

This commit is contained in:
Henry Jameson 2025-06-28 21:02:26 +03:00
commit 1a577cfcfc

View file

@ -391,7 +391,6 @@ const AppearanceTab = {
inputRuleset: [...input, paletteRule].filter(x => x), inputRuleset: [...input, paletteRule].filter(x => x),
ultimateBackgroundColor: '#000000', ultimateBackgroundColor: '#000000',
liteMode: true, liteMode: true,
debug: true,
onlyNormalState: true onlyNormalState: true
}) })
} }
@ -400,7 +399,6 @@ const AppearanceTab = {
inputRuleset: [], inputRuleset: [],
ultimateBackgroundColor: '#000000', ultimateBackgroundColor: '#000000',
liteMode: true, liteMode: true,
debug: true,
onlyNormalState: true onlyNormalState: true
}) })
} }
@ -409,10 +407,16 @@ const AppearanceTab = {
this.compilationCache[key] = theme3 this.compilationCache[key] = theme3
} }
return getScopedVersion( const styleEl = document.getElementById('theme-holder')
getCssRules(theme3.eager), const styleSheet = styleEl.sheet
'#theme-preview-' + key styleSheet.insertRule([
).join('\n') '#theme-preview-',
key,
' {\n',
getCssRules(theme3.eager).join('\n'),
'\n}'
].join(''), 'index-max')
} }
} }
} }