json-editor.class { display: block; > json-properties, > json-properties > json-property, > editor-row > json-primitive { display: block; } > editor-row > json-primitive > code:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--surface-focus); color: var(--ink-strong); } & { min-width: 0; &[data-depth="1"] { --drawer-surface: var(--bg-shade-2); } &[data-depth="2"], &[data-depth="3"] { --drawer-surface: var(--bg-shade-3); } } & > editor-row { display: grid; align-items: center; grid-template-columns: 21px minmax(0, min(42%, 32ch)) 8ch minmax(0, 1fr) max-content; background: var(--drawer-surface); height: 21px; min-width: 0; white-space: nowrap; } > editor-row > row-actions { display: flex; flex: 0 0 auto; min-width: 21px; margin-left: auto; } &[data-root="true"] > editor-row { height: 22px; } > editor-row > carat-spacer { width: 21px; flex-shrink: 0; } > editor-row > field-name { padding-right: 4px; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; } > editor-row > field-name > h3 { font-weight: inherit; overflow: hidden; text-overflow: ellipsis; } > editor-row > field-name:empty { display: none; } > editor-row > field-name > input { max-width: 100%; } & > editor-row > code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-muted); padding: 0 3px; } & > editor-row > select, & > editor-row > small { font-size: 11px; color: var(--ink-muted); } > editor-row > json-primitive { flex: 1; min-width: 0; padding: 0 2px; overflow: hidden; } > editor-row > :is(field-name, json-primitive) > input[data-elastic-input] { field-sizing: content; width: auto; max-width: 100%; min-width: calc(1ch + 6px); } & > editor-row:has(> json-primitive[data-kind="number"]) { /* Long numeric drafts can borrow key space while short values keep the column. */ display: flex; > field-name { flex: 0 1 min(42%, 32ch); } > select, > small { flex: 0 0 67px; } } > editor-row > json-primitive[data-kind="number"] { flex: 0 0 auto; min-width: min(10ch, 50%); max-width: 50%; text-align: right; font-variant-numeric: tabular-nums; } > editor-row > json-primitive > input { text-align: inherit; } > editor-row > field-name:has(> input) { flex-shrink: 1; } > editor-row > field-name:has(> button[data-array-handle]) { display: flex; align-items: center; } > editor-row > json-primitive > code { display: block; overflow-x: auto; scrollbar-width: none; white-space: nowrap; } > json-properties { margin-left: 9px; border-left: 1px solid var(--ink-muted); } > json-properties > json-property { border-top: 1px solid var(--line); } > json-properties > json-property[data-array-drop="before"] > json-editor > editor-row { box-shadow: inset 0 2px var(--accent); } > json-properties > json-property[data-array-drop="after"] > json-editor > editor-row { box-shadow: inset 0 -2px var(--accent); } > editor-row > field-name > button[data-array-handle] { width: 18px; flex-shrink: 0; cursor: grab; color: var(--ink-muted); } &[data-root="false"] > editor-row > field-name::after { content: ":"; color: var(--ink-muted); padding-right: 3px; } > json-properties > editor-actions { display: flex; align-items: center; height: 21px; box-shadow: inset 0 1px var(--line); color: var(--ink-muted); } }