:root { --content-border: solid lightgray 2px; --content-border-radius: 5px; --content-focus-border: solid gray 2px; } .editor { display: none; } body { width: 100vw; min-width: 700px; height: 100vh; &[data-mode='editing'] { display: flex; align-items: stretch; /* gap: 0.5em; */ padding: 0.5em; .Dumby { flex: 0 0 50%; min-width: 45%; max-width: calc(50% - 0.5em); height: 100%; border: var(--content-border); border-radius: var(--content-border-radius); order: 1; &.focus { border: var(--content-focus-border); outline: var(--content-focus-border); } } .editor { display: block; flex: 0 0 50%; min-width: 45%; max-width: calc(50% - 0.5em); height: 100%; order: 2; } } } .EasyMDEContainer { display: flex; box-sizing: border-box; flex-direction: column; align-items: stretch; height: 100%; gap: 0.5em; .CodeMirror { flex: 1 0 0; padding: 0; border: var(--content-border); border-radius: var(--content-border-radius); font-family: monospace; font-size: 1rem; order: 1; .CodeMirror-scroll { margin-right: 0; } &.focus { border: var(--content-focus-border); outline: var(--content-focus-border); } /* padding of end of line */ span[role="presentation"]::after { content: ''; display: inline-block; margin-right: 30px; } span { white-space: pre; } .invalid-input { text-decoration: red wavy underline 1px; } .cm-heading-1 { font-size: 2em; } .cm-heading-2 { font-size: 1.5em; } .cm-heading-3 { font-size: 1.25em; } } .editor-toolbar { order: 2; flex: 0 0 0; border: var(--content-border); border-radius: var(--content-border-radius); .mde-roll { font-size: 1.5em; vertical-align: bottom; } } .editor-statusbar { order: 3; } } /* FIXME For those empty line (no child with cm-comment) */ .inside-code-block, .CodeMirror-line:has(.cm-formatting-code-block) { background: rgb(0 0 0 / 5%) !important; .cm-comment { background: none !important; } } .suggestion { display: flex; overflow: hidden; justify-content: space-between; align-items: center; max-width: 700px; cursor: pointer; white-space: nowrap; &:not(:first-child) { border-top: 1px solid rgb(203 213 225); } &.focus { background: rgb(226 232 240); } * { flex-shrink: 0; display: inline-block; overflow: hidden; padding-inline: 1em; } .info { color: steelblue; font-weight: bold; } .truncate { flex-shrink: 1; text-overflow: ellipsis; ::before { width: 2rem; } } }