Update editor styles for CodeMirror integration
This commit is contained in:
@@ -624,59 +624,45 @@ body:not([data-theme="light"]) .folder-item {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor__textarea {
|
.editor__codemirror {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
resize: none;
|
min-height: 0;
|
||||||
border: none;
|
}
|
||||||
padding: 14px;
|
|
||||||
font-family: "SF Mono", "Menlo", "Consolas", monospace;
|
.editor__codemirror--hidden {
|
||||||
font-size: 0.95rem;
|
display: none;
|
||||||
line-height: 1.5;
|
}
|
||||||
white-space: pre-wrap;
|
|
||||||
word-break: break-word;
|
.editor__codemirror .cm-editor {
|
||||||
overflow-wrap: anywhere;
|
height: 100%;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
}
|
|
||||||
|
|
||||||
.editor__textarea:focus {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor__textarea--hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor__textarea-wrap--preview .tln-wrapper {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tln-wrapper {
|
|
||||||
padding: 14px 10px;
|
|
||||||
min-width: 3ch;
|
|
||||||
text-align: right;
|
|
||||||
font-family: "SF Mono", "Menlo", "Consolas", monospace;
|
font-family: "SF Mono", "Menlo", "Consolas", monospace;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: var(--muted);
|
}
|
||||||
|
|
||||||
|
.editor__codemirror .cm-scroller {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor__codemirror .cm-content {
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor__codemirror .cm-gutters {
|
||||||
background: var(--bg-contrast);
|
background: var(--bg-contrast);
|
||||||
border-right: 1px solid var(--border);
|
border-right: 1px solid var(--border);
|
||||||
user-select: none;
|
color: var(--muted);
|
||||||
overflow: hidden;
|
|
||||||
height: 100%;
|
|
||||||
counter-reset: line;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tln-line {
|
.editor__codemirror .cm-gutterElement {
|
||||||
display: block;
|
padding: 0 10px 0 0;
|
||||||
height: 1.5em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tln-line::before {
|
.editor__codemirror .cm-activeLineGutter {
|
||||||
counter-increment: line;
|
background: transparent;
|
||||||
content: counter(line);
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-preview {
|
.markdown-preview {
|
||||||
|
|||||||
Reference in New Issue
Block a user