fix(core): update

This commit is contained in:
Philipp Kunz 2021-03-27 18:21:38 +00:00
parent b6fc6b4f31
commit 746ebe1490

View File

@ -1,5 +1,6 @@
import { CSSResult } from 'lit-element'; import { CSSResult } from 'lit-element';
import * as plugins from './dees-element.plugins'; import * as plugins from './dees-element.plugins';
import * as domtools from
export interface IDbVarTriplet { export interface IDbVarTriplet {
cssVarName: string; cssVarName: string;
@ -21,7 +22,9 @@ export class CssManager {
darkValue: darkValueArg darkValue: darkValueArg
} }
this.dbVarTripletStore.push(newTriplet) this.dbVarTripletStore.push(newTriplet)
document.body.style.setProperty(newTriplet.cssVarName, newTriplet.darkValue); document.onreadystatechange = () => {
document.body.style.setProperty(newTriplet.cssVarName, newTriplet.darkValue);
}
return plugins.litElement.unsafeCSS(newTriplet.cssVarName); return plugins.litElement.unsafeCSS(newTriplet.cssVarName);
} }
} }