Add canonical grammar and CodeMirror playground

This commit is contained in:
2026-07-08 23:41:26 +09:00
parent a07f4c48aa
commit ee031bd2e8
15 changed files with 709 additions and 81 deletions
+9 -26
View File
@@ -419,43 +419,26 @@ button:disabled {
text-align: left;
}
.editor-wrap {
.code-editor {
background: var(--editor-bg);
flex: 1;
min-height: 0;
position: relative;
}
.editor-wrap pre,
.editor-wrap textarea {
border: 0;
box-sizing: border-box;
font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
inset: 0;
margin: 0;
overflow: auto;
padding: 12px;
position: absolute;
tab-size: 2;
white-space: pre;
.code-editor .cm-editor {
height: 100%;
}
.editor-wrap pre {
color: var(--editor-text);
pointer-events: none;
.code-editor .cm-line {
padding: 0;
}
.editor-wrap textarea {
background: transparent;
caret-color: var(--editor-text);
color: transparent;
outline: none;
resize: none;
width: 100%;
.code-editor .cm-activeLine {
background: rgb(59 130 246 / 0.08);
}
.editor-wrap textarea::selection {
background: var(--selection);
.code-editor .cm-activeLineGutter {
background: rgb(59 130 246 / 0.12);
}
.output-pane pre {