fix(editor): add find/replace bar and tidy CodeMirror scrolling
This commit is contained in:
@@ -381,7 +381,7 @@ body.editing.cm-active { display: flex; flex-direction: column; height: 100vh; o
|
||||
body.editing.cm-active .tabbar { flex: none; }
|
||||
body.editing.cm-active #app { flex: 1; min-height: 0; width: 100%; max-width: none; padding: 0; overflow: hidden; }
|
||||
body.editing.cm-active #editor { display: none; }
|
||||
body.editing.cm-active #cm-editor { display: block; height: 100%; padding: 10px 24px 0 14px; box-sizing: border-box; }
|
||||
body.editing.cm-active #cm-editor { display: block; height: 100%; padding: 10px 0 0 14px; box-sizing: border-box; }
|
||||
#cm-editor .CodeMirror { height: 100%; background: transparent; color: inherit; font: 14px/1.6 "SF Mono","Menlo","Consolas",monospace; }
|
||||
#cm-editor .CodeMirror-gutters { background: transparent; border-right: 1px solid rgba(128,128,128,.18); }
|
||||
#cm-editor .CodeMirror-linenumber { color: #9aa0a6; padding: 0 10px 0 4px; }
|
||||
@@ -405,7 +405,9 @@ body.editing.cm-active #cm-editor { display: block; height: 100%; padding: 10px
|
||||
#cm-editor .CodeMirror-dialog input { font: inherit; }
|
||||
#cm-editor .CodeMirror-dialog button { color: #1a1a1a; }
|
||||
#cm-editor .CodeMirror-foldmarker { color: #0550ae; text-shadow: none; background: rgba(9,105,218,.08); border-radius: 3px; padding: 0 .3em; }
|
||||
#cm-editor .CodeMirror-lines { padding: 4px 0 24px; }
|
||||
#cm-editor .CodeMirror-lines { padding: 4px 24px 24px 0; }
|
||||
#cm-editor .CodeMirror-scroll { overflow-x: hidden !important; }
|
||||
#cm-editor .CodeMirror-scrollbar-filler { display: none !important; }
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#cm-editor .CodeMirror { color: #d4d4d4; }
|
||||
@@ -429,3 +431,13 @@ body.editing.cm-active #cm-editor { display: block; height: 100%; padding: 10px
|
||||
@media print {
|
||||
#cm-editor { display: none !important; }
|
||||
}
|
||||
|
||||
/* Edit-mode find/replace bar: same look as the preview findbar. */
|
||||
html.cm-editing { overflow: hidden; scrollbar-gutter: auto; }
|
||||
#edit-findbar { top: calc(var(--chrome-top) + 8px); z-index: 130; }
|
||||
body.edit-finding #edit-findbar { display: flex; }
|
||||
#edit-findbar .edit-replace-group { display: flex; align-items: center; gap: 6px; }
|
||||
#edit-findbar .edit-replace-group[hidden] { display: none; }
|
||||
#edit-findbar #edit-replace-input { width: 160px; }
|
||||
#edit-findbar button.edit-replace-btn { width: auto; min-width: 54px; padding: 0 8px; font-size: 12px; }
|
||||
#cm-editor .cm-edit-find-hit { background: rgba(255, 213, 0, .38); }
|
||||
|
||||
Reference in New Issue
Block a user