Files
pages/static/vendor/codemirror/editor.css
T
Anya Tokugawa d5d21b7841
Build and publish container images / images (push) Successful in 9m34s
Release container images / release (push) Successful in 36s
Refactor architecture into eight components and consolidate reliability work
Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts.

Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation.

Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
2026-11-01 15:23:31 +09:00

647 lines
16 KiB
CSS

.cm-editor {
min-height: 70vh;
background: #0b0f14;
color: #d7dde8;
border: 1px solid #263241;
border-radius: 0.35rem;
font-size: 0.95rem;
}
.cm-scroller {
font-family:
"JetBrains Mono",
"Hack Nerd Font",
monospace;
}
.cm-content {
min-height: 70vh;
caret-color: #ffd866;
}
.cm-gutters {
background: #080c10;
color: #596678;
border-right: 1px solid #263241;
}
.cm-activeLine {
background: rgba(255,255,255,0.035);
}
.cm-activeLineGutter {
background: rgba(255,255,255,0.045);
color: #ffd866;
}
.cm-cursor {
/* Keep the insertion point visible without relying on a thin vertical bar. */
width: 0.72em;
border-left: 0;
border-bottom: 2px solid #ffd866;
margin-bottom: -2px;
}
/* Vim mode draws a separate fat cursor layer; keep the same underline cue. */
.cm-vimCursorLayer .cm-fat-cursor {
background: transparent !important;
border: 0 !important;
border-bottom: 2px solid #ffd866 !important;
box-sizing: border-box;
}
.cm-selectionBackground,
.cm-content ::selection {
background: rgba(120,160,255,0.35) !important;
}
.cm-line {
padding: 0 0.25rem;
}
.cm-focused {
outline: none;
box-shadow:
0 0 0 1px rgba(255,216,102,0.28),
0 0 1.2rem rgba(255,216,102,0.08);
}
.editor-shell {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
}
.editor-toolbar {
display: flex;
gap: 0.5rem;
align-items: center;
margin-bottom: 0.75rem;
flex-wrap: wrap;
}
.editor-toolbar button,
.editor-toolbar a {
background: #111821;
color: #d7dde8;
border: 1px solid #263241;
border-radius: 0.25rem;
padding: 0.38rem 0.7rem;
text-decoration: none;
}
.editor-toolbar button:hover,
.editor-toolbar a:hover {
background: #1a2430;
color: #ffffff;
}
.editor-meta {
color: #8190a5;
font-family:
"JetBrains Mono",
monospace;
font-size: 0.86rem;
margin-bottom: 0.75rem;
}
.cm-tooltip {
background: #111821;
color: #d7dde8;
border: 1px solid #44506a;
border-radius: 0.25rem;
box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.45);
z-index: 2000;
}
.cm-tooltip-autocomplete ul {
max-height: 18rem;
overflow-y: auto;
}
.cm-tooltip-autocomplete ul li[aria-selected] {
background: #26324a;
color: #ffffff;
}
.cm-vim-panel {
background: #080c10;
color: #ffd866;
border-top: 1px solid #263241;
font-family: "JetBrains Mono", monospace;
padding: 0.25rem 0.5rem;
}
.cm-vim-panel input {
background: #111821;
color: #ffd866;
border: 1px solid #44506a;
}
.cm-editor.cm-focused {
outline: none;
}
/* autocomplete popup */
.cm-tooltip {
background: #101624 !important;
color: #e6eaff !important;
border: 1px solid #5d6f9f !important;
border-radius: 0.25rem;
box-shadow: 0 0.45rem 1.2rem rgba(0,0,0,0.55);
z-index: 3000;
}
.cm-tooltip-autocomplete {
font-family:
"JetBrains Mono",
monospace;
}
.cm-tooltip-autocomplete ul {
max-height: 18rem;
overflow-y: auto;
}
.cm-tooltip-autocomplete ul li {
color: #e6eaff !important;
background: #101624 !important;
padding: 0.25rem 0.5rem;
}
.cm-tooltip-autocomplete ul li[aria-selected] {
background: #314a7a !important;
color: #ffffff !important;
}
.cm-completionLabel {
color: #ffffff !important;
}
.cm-completionDetail {
color: #ffd86f !important;
}
.cm-completionInfo {
background: #101624 !important;
color: #e6eaff !important;
border: 1px solid #5d6f9f !important;
}
/* editor layout */
.editor-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 1rem;
height: auto;
min-height: 30rem;
}
#editor-mount {
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
#editor-mount .cm-editor {
flex: 1;
min-height: 0;
height: 100%;
}
#editor-mount .cm-scroller {
overflow: auto;
}
.preview {
min-width: 0;
min-height: 0;
height: 100%;
overflow: auto;
}
/* status bar */
.editor-statusbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
height: 1.8rem;
padding: 0 0.65rem;
border: 1px solid #263241;
border-top: none;
background: #080c10;
color: #9fa9c2;
font-family:
"JetBrains Mono",
monospace;
font-size: 0.78rem;
}
.editor-statusbar strong {
color: #ffd86f;
font-weight: normal;
}
.editor-status-left,
.editor-status-right {
display: flex;
gap: 0.8rem;
align-items: center;
}
/* viewport-contained editor */
body.mode-editor {
height: 100vh;
overflow: hidden;
}
body.mode-editor .topbar {
height: 48px;
box-sizing: border-box;
align-items: center;
justify-content: flex-start;
gap: 0.75rem;
padding: 0.4rem 0.65rem;
}
body.mode-editor .topbar .brand {
flex: 0 0 auto;
white-space: nowrap;
}
body.mode-editor .topbar .brand a {
margin-right: 0;
}
body.mode-editor .container {
height: calc(100vh - 48px);
overflow: hidden;
box-sizing: border-box;
padding: 0;
}
body.mode-editor .card {
height: 100%;
box-sizing: border-box;
overflow: hidden;
display: flex;
flex-direction: column;
margin: 0;
padding: 0;
border: 0;
}
body.mode-editor .editor-grid {
flex: 1;
min-height: 0;
height: auto;
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 0;
}
body.mode-editor .editor-pane {
min-height: 0;
display: flex;
flex-direction: column;
}
body.mode-editor #editor-mount {
flex: 1;
min-height: 0;
}
body.mode-editor #editor-mount .cm-editor {
height: 100%;
min-height: 0;
}
body.mode-editor #editor-mount .cm-scroller {
overflow: auto;
}
body.mode-editor #preview {
height: 100%;
min-height: 0;
overflow: auto;
box-sizing: border-box;
border-width: 0 0 0 1px;
}
body.mode-editor .editor-grid.preview-hidden {
grid-template-columns: 1fr !important;
}
body.mode-editor .editor-grid.preview-hidden .editor-pane {
width: 100%;
height: 100%;
}
body.mode-editor .editor-grid.preview-hidden #preview {
display: none;
}
/* cursor visibility */
.cm-cursor,
.cm-dropCursor {
border-left: 2px solid #ffd86f !important;
}
.cm-focused .cm-cursor {
border-left-color: #ffef9a !important;
box-shadow: 0 0 0.35rem rgba(255,216,102,0.65);
}
.cm-selectionMatch {
background: rgba(255,216,102,0.18);
}
/* reduce native-looking scrollbar noise */
body.mode-editor {
scrollbar-width: none;
}
body.mode-editor::-webkit-scrollbar {
width: 0;
height: 0;
}
/* editor scrollbars */
body.mode-editor .cm-scroller,
body.mode-editor #preview,
body.mode-editor .preview,
body.mode-editor .cm-tooltip-autocomplete ul {
scrollbar-width: thin;
scrollbar-color: #5d6f9f #080c10;
}
body.mode-editor .cm-scroller::-webkit-scrollbar,
body.mode-editor #preview::-webkit-scrollbar,
body.mode-editor .preview::-webkit-scrollbar,
body.mode-editor .cm-tooltip-autocomplete ul::-webkit-scrollbar {
width: 0.55rem;
height: 0.55rem;
}
body.mode-editor .cm-scroller::-webkit-scrollbar-track,
body.mode-editor #preview::-webkit-scrollbar-track,
body.mode-editor .preview::-webkit-scrollbar-track,
body.mode-editor .cm-tooltip-autocomplete ul::-webkit-scrollbar-track {
background: #080c10;
}
body.mode-editor .cm-scroller::-webkit-scrollbar-thumb,
body.mode-editor #preview::-webkit-scrollbar-thumb,
body.mode-editor .preview::-webkit-scrollbar-thumb,
body.mode-editor .cm-tooltip-autocomplete ul::-webkit-scrollbar-thumb {
background: #5d6f9f;
border-radius: 999px;
border: 2px solid #080c10;
}
body.mode-editor .cm-scroller::-webkit-scrollbar-thumb:hover,
body.mode-editor #preview::-webkit-scrollbar-thumb:hover,
body.mode-editor .preview::-webkit-scrollbar-thumb:hover,
body.mode-editor .cm-tooltip-autocomplete ul::-webkit-scrollbar-thumb:hover {
background: #ffd86f;
}
/* autocomplete popup width/scroll cleanup */
.cm-tooltip-autocomplete {
overflow: hidden !important;
}
.cm-tooltip-autocomplete ul {
background: #101624 !important;
padding: 0.15rem 0 !important;
}
.cm-tooltip-autocomplete ul::-webkit-scrollbar-corner {
background: #080c10;
}
/* line numbers */
.cm-lineNumbers .cm-gutterElement {
color: #7f8ca8;
padding: 0 0.65rem 0 0.45rem;
}
.cm-gutters {
background: #070c12 !important;
border-right: 1px solid #263241 !important;
}
.cm-activeLineGutter {
background: #172033 !important;
color: #ffd86f !important;
}
.cm-lineNumbers .cm-gutterElement:hover {
color: #ffffff;
}
/* editor compact command menu */
.editor-head {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
min-width: 0;
min-height: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0;
background: transparent;
flex: 1 1 auto;
}
.editor-head-left {
min-width: 0;
display: flex;
align-items: center;
gap: 0.35rem;
overflow-x: auto;
}
.editor-head-right {
position: relative;
display: flex;
align-items: center;
gap: 0.45rem;
}
.editor-head button,
.editor-head a {
height: 2rem;
min-width: 2rem;
padding: 0 0.65rem;
border: 1px solid #344158;
background: #101624;
color: #d7dde8;
border-radius: 0.25rem;
cursor: pointer;
box-sizing: border-box;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
font: inherit;
text-decoration: none;
margin-right: 0;
}
.editor-head .danger {
color: #ff8ca8;
}
.editor-head .editor-action-icon {
width: 2rem;
padding: 0.35rem;
}
.editor-action-icon svg {
width: 1.2rem;
height: 1.2rem;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.editor-head button:hover,
.editor-head a:hover,
.editor-preview-toggle[aria-pressed="true"] {
background: #1b2640;
color: #ffffff;
}
.editor-preview-toggle {
width: 2rem;
min-width: 2rem !important;
padding: 0.35rem !important;
}
.editor-preview-toggle svg {
width: 1.2rem;
height: 1.2rem;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.editor-preview-toggle .preview-pane-fill {
fill: currentColor;
stroke: none;
opacity: 0.45;
}
.editor-head .editor-format-icon {
width: 2rem;
padding: 0.35rem;
}
.editor-format-icon svg {
width: 1.2rem;
height: 1.2rem;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.editor-head .editor-format-icon.active {
border-color: #ffd86f;
color: #ffd86f;
background: #1b2640;
}
/* Theme-aware editing. Syntax is styled semantically by HighlightStyle; do not
target generated Lezer class names, whose assignments change between builds. */
.cm-editor { background:var(--bg) !important; color:var(--fg) !important; border-color:var(--border); }
.cm-content, .cm-line { color:var(--fg) !important; caret-color:var(--editor-caret); }
.cm-gutters { background:var(--input-bg) !important; color:var(--muted) !important; border-color:var(--border) !important; }
.cm-lineNumbers .cm-gutterElement { color:inherit; }
.cm-lineNumbers .cm-gutterElement:hover { color:var(--fg); }
.cm-activeLine { background:color-mix(in srgb,var(--accent) 7%,transparent) !important; }
.cm-activeLineGutter { background:color-mix(in srgb,var(--accent) 14%,var(--input-bg)) !important; color:var(--fg) !important; }
.cm-focused { box-shadow:0 0 0 1px var(--accent); }
.cm-cursor, .cm-focused .cm-cursor { border-left:0 !important; border-bottom:3px solid var(--editor-caret); box-shadow:none; }
.cm-dropCursor { border-left:2px solid var(--editor-caret) !important; }
.cm-vimCursorLayer .cm-fat-cursor { border-bottom:3px solid var(--editor-caret) !important; background:color-mix(in srgb,var(--editor-caret) 18%,transparent) !important; }
body[data-editor-mode="normal"] { --editor-caret:var(--accent); }
body[data-editor-mode="replace"] { --editor-caret:var(--danger); }
body[data-editor-mode="visual"] { --editor-caret:var(--editor-string); }
.cm-editor .cm-selectionLayer > div,
.cm-editor.cm-focused .cm-selectionLayer > div,
.cm-editor.pageswiki-vim-visual .cm-selectionLayer > div,
.cm-selectionBackground,
.cm-content ::selection { background:var(--editor-selection) !important; }
.cm-content ::selection { color:var(--fg) !important; }
.cm-selectionMatch { background:var(--editor-selection); }
.cm-tooltip, .cm-completionInfo { background:var(--input-bg) !important; color:var(--fg) !important; border-color:var(--border) !important; }
.cm-tooltip-autocomplete ul li { color:var(--fg) !important; background:var(--input-bg) !important; }
.cm-tooltip-autocomplete ul { background:var(--input-bg) !important; }
.cm-tooltip-autocomplete ul li[aria-selected="true"] { color:var(--fg) !important; background:color-mix(in srgb,var(--accent) 20%,var(--input-bg)) !important; }
.cm-completionLabel { color:var(--fg) !important; }
.cm-completionDetail { color:var(--link) !important; }
.cm-vim-panel, .editor-statusbar { background:var(--input-bg); color:var(--fg); border-color:var(--border); }
.editor-statusbar strong { color:var(--link); }
.editor-head button, .editor-head a, .editor-toolbar button, .editor-toolbar a { background:var(--button-bg); color:var(--button-fg); border-color:var(--button-border); }
.editor-head .danger { color:var(--danger); }
.editor-head button:hover, .editor-head a:hover, .editor-toolbar button:hover, .editor-toolbar a:hover, .editor-preview-toggle[aria-pressed="true"], .editor-head .editor-format-icon.active { background:var(--button-hover-bg); color:var(--link); border-color:var(--accent); }
.cm-vim-panel input { background:var(--bg); color:var(--fg); border-color:var(--border); }
.cm-scroller { scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track); }
.cm-scroller::-webkit-scrollbar-track { background:var(--scrollbar-track); }
.cm-scroller::-webkit-scrollbar-thumb { background:var(--scrollbar-thumb); }
.cm-scroller::-webkit-scrollbar-thumb:hover { background:var(--scrollbar-thumb-hover); }
@media (forced-colors:active) {
.cm-cursor, .cm-focused .cm-cursor, .cm-vimCursorLayer .cm-fat-cursor { border-bottom-color:CanvasText !important; }
}
.preview .diagram,
#preview .diagram {
margin: 1rem 0;
padding: 0.75rem;
border: 1px solid #263241;
background: #ffffff;
border-radius: 0.35rem;
overflow: auto;
}
.preview .diagram img,
#preview .diagram img {
max-width: 100%;
height: auto;
display: block;
}
/* Editor recovery and conflict UI uses theme tokens without rendering source. */
.editor-dialog {color:var(--fg, #eee); background:var(--bg, #111); border:1px solid var(--border,#888); border-radius:.7rem; width:min(960px,94vw); max-height:90dvh; padding:1rem; box-sizing:border-box;}
.editor-dialog::backdrop {background:rgba(0,0,0,.5); backdrop-filter:blur(3px);}
.editor-dialog h2 {font-size:1.1rem; margin:0 0 .6rem;}
.editor-dialog-content {display:grid; gap:.6rem; max-height:68dvh; overflow:auto;}
.editor-dialog-content label {display:grid; gap:.25rem;}
.editor-dialog textarea,.editor-dialog input,.editor-dialog select {box-sizing:border-box; width:100%; color:inherit; background:var(--bg,#fff); border:1px solid var(--border,#888); padding:.5rem; font:inherit;}
.editor-dialog textarea {font-family:monospace; resize:vertical;}
.editor-dialog footer {display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.7rem;}
.editor-dialog button {color:inherit; background:var(--bg,#fff); border:1px solid var(--border,#888); border-radius:.3rem; padding:.4rem .7rem; cursor:pointer;}
#editor-save-status {max-width:55vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.8rem;}
#editor-save-status[data-state="auth"],#editor-save-status[data-state="conflict"],#editor-save-status[data-state="storage"] {color:var(--danger,#cf4050);}
@media (pointer:coarse) and (hover:none) {.editor-action-icon {min-width:36px; min-height:40px;} .editor-dialog button {min-height:44px;} #editor-save-status {max-width:60vw;}}