Correctly include editable css

This commit is contained in:
Henrik Giesel 2021-08-04 05:13:42 +02:00
parent 1465d3a848
commit cd36fe2518
5 changed files with 14 additions and 2 deletions

View file

@ -47,6 +47,7 @@ filegroup(
srcs = [
"css_local",
"editor",
"editable",
"reviewer",
],
visibility = ["//qt:__subpackages__"],

View file

@ -65,6 +65,7 @@ esbuild(
visibility = ["//visibility:public"],
deps = [
"editable",
"editable_scss",
"svelte_components",
"//ts/components",
"//ts/components:svelte_components",

View file

@ -12,4 +12,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
$: converted = convertMathjax(`${delimiters[0]}${mathjax}${delimiters[1]}`);
</script>
{@html converted}
<div on:click={console.log}>
{@html converted}
</div>
<style lang="scss">
div {
display: contents;
}
</style>

View file

@ -20,7 +20,7 @@ export class EditableContainer extends HTMLDivElement {
const rootStyle = document.createElement("link");
rootStyle.setAttribute("rel", "stylesheet");
rootStyle.setAttribute("href", "./_anki/css/editable.css");
rootStyle.setAttribute("href", "./_anki/css/editable-build.css");
shadow.appendChild(rootStyle);
this.baseStyle = document.createElement("style");

View file

@ -1,5 +1,7 @@
// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import "./editable-base.css";
import "./editable-container";
import "./editable";
import "./mathjax-components";