Use :host instead of :host-context

This commit is contained in:
Henrik Giesel 2021-07-26 16:06:50 +02:00
parent 4e133e7d8a
commit e9928f9126
2 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,7 @@ p {
}
}
:host-context(.nightMode) * {
:host(.nightMode) * {
@include scrollbar.night-mode;
}

View File

@ -27,6 +27,10 @@ export class EditingArea extends HTMLDivElement {
this.attachShadow({ mode: "open" });
this.className = "field";
if (document.documentElement.classList.contains("night-mode")) {
this.classList.add("night-mode");
}
const rootStyle = document.createElement("link");
rootStyle.setAttribute("rel", "stylesheet");
rootStyle.setAttribute("href", "./_anki/css/editable.css");