mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Prefer CSS variables in custom panel entrypoint (#12818)
This commit is contained in:
parent
0183e32267
commit
5951f5c5c4
@ -51,11 +51,15 @@ function initialize(
|
|||||||
const style = document.createElement("style");
|
const style = document.createElement("style");
|
||||||
|
|
||||||
style.innerHTML = `
|
style.innerHTML = `
|
||||||
body { margin:0; }
|
body {
|
||||||
|
margin:0;
|
||||||
|
background-color: var(--primary-background-color, #fafafa);
|
||||||
|
color: var(--primary-text-color, #212121);
|
||||||
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
body {
|
body {
|
||||||
background-color: #111111;
|
background-color: var(--primary-background-color, #111111);
|
||||||
color: #e1e1e1;
|
color: var(--primary-text-color, #e1e1e1);
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
document.head.appendChild(style);
|
document.head.appendChild(style);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user