mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Apply specific CSS to Mathjax CodeMirror
This commit is contained in:
parent
219557afda
commit
71bdeeba39
2 changed files with 13 additions and 0 deletions
|
@ -24,6 +24,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
|
border-radius: 5px;
|
||||||
background-color: var(--frame-bg);
|
background-color: var(--frame-bg);
|
||||||
border-color: var(--medium-border);
|
border-color: var(--medium-border);
|
||||||
min-width: 1rem;
|
min-width: 1rem;
|
||||||
|
|
|
@ -35,6 +35,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
codeMirror.focus();
|
codeMirror.focus();
|
||||||
codeMirror.setCursor(codeMirror.lineCount(), 0);
|
codeMirror.setCursor(codeMirror.lineCount(), 0);
|
||||||
|
|
||||||
|
const codeMirrorElement = textarea.nextElementSibling!;
|
||||||
|
codeMirrorElement.classList.add("mathjax-editor");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -59,3 +62,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
use:openCodemirror
|
use:openCodemirror
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/* TODO there is global CSS in fields.scss */
|
||||||
|
div :global(.mathjax-editor) {
|
||||||
|
border-radius: 0;
|
||||||
|
border-width: 0 1px;
|
||||||
|
border-color: var(--medium-border);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue