mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Merge pull request #1312 from hgiesel/smalleditorrefactors
Use :host instead of :host-context
This commit is contained in:
commit
9c1c298426
2 changed files with 5 additions and 1 deletions
|
@ -26,7 +26,7 @@ p {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:host-context(.nightMode) * {
|
:host(.nightMode) * {
|
||||||
@include scrollbar.night-mode;
|
@include scrollbar.night-mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,10 @@ export class EditingArea extends HTMLDivElement {
|
||||||
this.attachShadow({ mode: "open" });
|
this.attachShadow({ mode: "open" });
|
||||||
this.className = "field";
|
this.className = "field";
|
||||||
|
|
||||||
|
if (document.documentElement.classList.contains("night-mode")) {
|
||||||
|
this.classList.add("night-mode");
|
||||||
|
}
|
||||||
|
|
||||||
const rootStyle = document.createElement("link");
|
const rootStyle = document.createElement("link");
|
||||||
rootStyle.setAttribute("rel", "stylesheet");
|
rootStyle.setAttribute("rel", "stylesheet");
|
||||||
rootStyle.setAttribute("href", "./_anki/css/editable.css");
|
rootStyle.setAttribute("href", "./_anki/css/editable.css");
|
||||||
|
|
Loading…
Reference in a new issue