/* * The bottom terminal's shell (src/client/TerminalView.tsx). * * Skin contract (guide §12): every declaration resolves to a `--dsw-*` / * `--ds-*` token, and `color` never carries a literal — `tests/theme.spec.ts` * enforces the second half mechanically. The screen element is also the token * BRIDGE for xterm's own palette: the component reads its computed * `background-color` / `color` / `font-family` back and hands those concrete * values to the emulator, so a skin flip re-themes the terminal in place. */ .root { display: flex; flex: 1; flex-direction: column; box-sizing: border-box; height: 100%; min-height: 0; color: var(--dsw-alias-label-primary); } .screen { flex: 1; min-width: 0; min-height: 0; padding: 8px; overflow: hidden; color: var(--dsw-alias-label-primary); /* No fill of its own: the terminal sits inside the workbench and must read as part of its surface. Painting a token here drew a second rectangle inside the panel. */ background: transparent; font-family: var(--ds-font-family-code, monospace); } .screen .xterm { height: 100%; } /* xterm owns these classes, so they MUST be wrapped in `:global()`: CSS Modules would otherwise hash them into `.o8IiwG_xterm-viewport` and match nothing in the real DOM. The extra `.xterm` in the selector is NOT redundant either. xterm.css ships `.xterm .xterm-viewport { background-color: #000 }` at specificity 0,2,0 and injects that sheet when `open()` runs — after this module. Matching its specificity would therefore lose on source order every time; reaching 0,3,0 is what wins. Measured in Chromium: 0,2,0 → `rgb(0, 0, 0)` (still black), 0,3,0 → `rgba(0, 0, 0, 0)` (transparent). */ .screen :global(.xterm .xterm-viewport) { background: transparent; } .status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 12px; color: var(--dsw-alias-label-secondary, var(--dsw-alias-label-primary)); background: var(--dsw-alias-bg-layer-2); } .noticeBlock { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 0; padding: 24px; overflow: auto; } .notice { max-width: 32ch; margin: 0; line-height: 1.6; text-align: center; overflow-wrap: anywhere; color: var(--dsw-alias-label-primary); } .error { margin: 0; padding: 10px 12px; overflow-wrap: anywhere; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-2); } .action { flex: none; padding: 3px 10px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 6px; cursor: pointer; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1); } .action:hover { background: var(--dsw-alias-bg-layer-2); }