Apply specific CSS to Mathjax CodeMirror

This commit is contained in:
Henrik Giesel 2021-09-09 15:06:07 +02:00
parent 219557afda
commit 71bdeeba39
2 changed files with 13 additions and 0 deletions

View file

@ -24,6 +24,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<style lang="scss">
.dropdown-menu {
border-radius: 5px;
background-color: var(--frame-bg);
border-color: var(--medium-border);
min-width: 1rem;

View file

@ -35,6 +35,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
onMount(() => {
codeMirror.focus();
codeMirror.setCursor(codeMirror.lineCount(), 0);
const codeMirrorElement = textarea.nextElementSibling!;
codeMirrorElement.classList.add("mathjax-editor");
});
</script>
@ -59,3 +62,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use:openCodemirror
/>
</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>