mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 05:46:35 +00:00
Try to use existing updateStyles for theming (#1217)
This commit is contained in:
parent
d3b6740488
commit
dd57ddbef6
@ -23,8 +23,10 @@ export default function applyThemesOnElement(element, themes, localTheme, update
|
|||||||
styles[prefixedKey] = theme[key];
|
styles[prefixedKey] = theme[key];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// implement updateStyles() method of Polemer elements
|
if (element.updateStyles) {
|
||||||
if (window.ShadyCSS) {
|
element.updateStyles(styles);
|
||||||
|
} else if (window.ShadyCSS) {
|
||||||
|
// implement updateStyles() method of Polemer elements
|
||||||
window.ShadyCSS.styleSubtree(/** @type {!HTMLElement} */(element), styles);
|
window.ShadyCSS.styleSubtree(/** @type {!HTMLElement} */(element), styles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user