/** * Sidebar styles. Per the DSH web-styling rules every visual value rides the * theme: --dsw-alias-* semantic tokens for colors, --dsw-font-* typography * roles (size paired with line-height), and --ds-* for motion. The chrome * mirrors the native DSH sidebar: flat (NO box-shadows anywhere), the * sidebar fill surface, hairline borders, and the 28/36px circular icon * controls with hover fills. No static palette values, no color literals, no * theme selectors — light/dark adaptation is the theme package's job. */ /* ── Shell ─────────────────────────────────────────────────────────────── */ /* Skinning contract (token-driven): every surface here consumes DSH's generic tokens (`--dsw-alias-*`), NEVER `--dsw-specific-sidebar-fill` — skin systems override that token to restyle the APP's own left-nav column (dsh-web-ui skins make it translucent glass or theme colors, Aqua makes it transparent), and a panel consuming it would lose its fill or clash with the label tokens. The panels use the generic card surface `--dsw-alias-bg-layer-1`, which every dsh-web-ui skin overrides — so switching skins in the dsh-web-ui skin center re-skins the sidebar panels automatically (see AGENTS.md §8). */ /* The unified panel host: a fixed, viewport-sized, click-transparent containing block for every panel element. Panels are ABSOLUTE within it (not fixed), so a desktop shell's intermediate wrapper transform can never hijack their containing block — the host itself is the only fixed element, appended directly to document.body. The layer sits at z-index 25: above the app's shell overlay (AppFrame overlayLayer, 20) and in-flow content, below DSH's ui-cordis dynamic-plugin panel (fixed, 30 — the inventory/surfacing surface must never be hidden behind the workbench), and below the app's overlay stack at 100+; each panel re-enables pointer events on itself. Degraded mode ([data-dsh-panel-host-degraded]) covers the rare shell that transforms / itself: the host becomes absolute and the mount self-check pins it to the viewport every frame. */ :global([data-dsh-panel-host]) { position: fixed; inset: 0; /* Explicit viewport height — NOT a containing-block derivation (issue #616). `inset: 0` alone sizes a fixed box from its containing block, and a page-level `filter` / `backdrop-filter` / `transform` — exactly what a glass skin puts on the shell wrapper or on itself — REPLACES that containing block with the ancestor's own padding box. The shell's content is itself fixed/viewport-sized, so that box is zero-height: the host collapses to 0px and the whole native right sidebar goes invisible while its DOM (and every panel in it) is fully present. `vh` is measured against the viewport instead, so the height survives any ancestor's containing-block games; the over-constrained triple (top: 0 + height + bottom: 0) resolves by ignoring `bottom`, keeping this a top-anchored viewport-height layer. */ height: 100vh; z-index: 25; pointer-events: none; /* Clip at the viewport edge: collapsed panels slide off-screen with `transform: translate(102%)`, and a transformed element still contributes to its ancestors' scrollable overflow — without this the hidden panels extended the document's scrollable area, making the whole page draggable left-right and up-down while any panel was collapsed. The host is exactly viewport-sized (inset: 0 + the explicit 100vh height above), so the clip is invisible until a panel slides in from the edge; internal scroll containers and the app's fixed overlay stack are unaffected. `clip`, not `hidden`: a hidden box stays a PROGRAMMATICALLY scrollable container, and a scrollIntoView fired from panel content (the file tree's "Show in folder" reveal) scrolled the host itself — shifting the whole panel, tab bar included, out of the viewport with no way to scroll back. The same class covers any scroll-into-view fixup — focus moving into an off-viewport region, a nested iframe/workbench claiming focus while it loads — so the guard belongs on the layer itself, not per call site. The `hidden` declaration BEFORE `clip` is an old-engine fallback, not dead style: engines without `clip` support (Safari < 16) drop the `clip` line, which would leave this box `overflow: visible` — no clipping at all, and the page-draggable regression above returns. With `hidden` first those engines keep the clipping (plus its pre-clip scrollability) while every clip-aware engine applies the later `clip`. */ overflow: hidden; overflow: clip; } /* Desktop drag regions ignore pointer-events: the shell's base stylesheet makes every direct body child `no-drag`, and the plugin HOST is one — in Electron that value also reaches the viewport-sized panel layer inside it (#772's CDP reading; the browser engine used by the mount lane does not propagate it, so the layer's own rule below is belt-and-braces), which is what cancelled every window-drag strip beneath it once the shell recomputed regions (window drags worked once, then stopped). Take the host and layer out of the app-region computation; `!important` because the shell's `body > :not(#root)` selector outranks ours. The panels themselves stay no-drag so their controls keep receiving clicks. The plugin's OTHER persistent viewport-sized body child — the mermaid zoom modal — carries the same reset on its own rule further down, or opening a diagram would blank window drag (and the macOS double-click-title zoom) while it is up. It is a modal SCRIM, so it does get the reset even though it is interactive: only its widgets (`