.preview { display: flex; flex-direction: column; height: 100%; width: 100%; background: var(--bg); } .header { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); height: 40px; padding: 0 var(--space-4); border-bottom: var(--border-width) solid var(--border); } .body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: var(--space-5); box-sizing: border-box; } /* Fit-mode segmented control (spec §04) styling now lives in SegmentedControl.module.css; the per-mode sizing classes below stay here. */ /* * Chart sizing. The host (passed to vega-embed) is branded `.vega-embed` * (display:inline-block) at runtime; that shrink-wraps it, which is why * width:"container" collapsed before. The frame carries the fit class and the * two-class selectors below out-specify `.vega-embed` to give the host a * definite box for the responsive modes. `box-sizing:border-box` keeps the * chart inside the body padding rather than overflowing it. */ .frame { box-sizing: border-box; } .host { box-sizing: border-box; } /* Original — natural size; the body scrolls if the chart is larger than the pane. */ .fitOriginal { display: inline-block; } /* Width — host spans the pane width; height stays natural. */ .fitWidth { display: block; width: 100%; } .fitWidth .host { width: 100%; } /* Height — host spans the pane height; width stays natural. */ .fitHeight { display: block; height: 100%; } .fitHeight .host { height: 100%; } /* Full — host fills the pane in both dimensions. */ .fitFull { display: block; width: 100%; height: 100%; } .fitFull .host { width: 100%; height: 100%; } .error { margin: 0; padding: var(--space-5); font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--support-error); white-space: pre-wrap; word-break: break-word; }