1#edit-grid {
2 display: grid;
3 grid-template-columns: 1fr 80ch;
4 grid-template-rows: 3rem 1fr;
5 grid-gap: 1em;
6 height: 100vh;
7
8 button {
9 margin-right: 1rem;
10 }
11 main {
12 padding: 0;
13 margin: 0;
14 }
15}
16#topleft, #topright {
17 padding: 1rem;
18}
19#topleft {
20 padding-right: 0rem;
21}
22#topright {
23 padding-left: 0rem;
24}
25#preview {
26 overflow-y: auto;
27 e- {
28 margin-top: 0;
29 }
30}
31#editor-wrap {
32 position: relative;
33 min-height: 0;
34 margin-top: 1rem;
35 width: calc(100% - 20px);
36}
37/* The overlay only draws squiggles, so its text metrics must match the textarea. */
38#editor, #editor-overlay {
39 position: absolute;
40 inset: 0;
41 margin: 0 !important;
42 box-sizing: border-box;
43 border: 2px solid transparent;
44 padding: 0.5rem;
45 font-family: monospace;
46 font-size: inherit;
47 line-height: normal;
48 white-space: pre-wrap;
49 overflow-wrap: break-word;
50 overflow-y: scroll;
51 height: auto;
52 max-width: unset;
53}
54#editor {
55 background-color: transparent;
56 border-color: black;
57 resize: none;
58 &:focus-visible {
59 border-color: var(--a);
60 }
61}
62#editor-overlay {
63 background-color: #303030;
64 color: transparent;
65 user-select: none;
66 pointer-events: none;
67 scrollbar-color: transparent transparent;
68
69 span {
70 text-decoration: underline wavy #f55;
71 text-decoration-skip-ink: none;
72 }
73}
74#editor-overlay::-webkit-scrollbar-thumb,
75#editor-overlay::-webkit-scrollbar-track {
76 background: transparent;
77}
78#spell-menu {
79 position: absolute;
80 z-index: 1;
81 display: flex;
82 flex-direction: column;
83 border: 2px solid var(--a);
84 background-color: #242424;
85
86 &[hidden] {
87 display: none;
88 }
89 button {
90 margin: 0;
91 border: none;
92 padding: 0.25rem 0.5rem;
93 background-color: transparent;
94 text-align: left;
95
96 &:hover, &:focus-visible {
97 background-color: var(--a);
98 color: #000;
99 outline: none;
100 }
101 }
102}