/* What a page drawn by the shell stands on, imported once by its host (as `@hud/shell/shell.css`, after `@hud/renderer/theme.css`): the reset, the body and the type, as web/src/app.css has them for the view, and the frame's measures, which frame.ts's `frameCss` sets for each band of the window's width and the components draw with. The rest is each component's, with the values of @hud/renderer/theme.css. */ /* The band's measures are frameCss's alone, for every width: a default here would come after its stylesheet in the page and win. */ :root { /* The column on a phone's band: its width, centred on anything wider. */ --hud-frame-phone: 30rem; } *, *::before, *::after { box-sizing: border-box; } html { -webkit-text-size-adjust: 100%; } html, body { height: 100%; } body { margin: 0; background: var(--color-background-primary); color: var(--color-text-primary); font-family: var(--font-sans); font-size: var(--font-text-md-size); line-height: var(--font-text-md-line-height); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; } /* A phone's column on a wider window, in the bar's band: on the canvas. */ @media (min-width: 30rem) { body { background: var(--app-canvas, var(--color-background-secondary)); } } :focus-visible { outline: 2px solid var(--color-ring-primary); outline-offset: 2px; } /* The frame, by its band (`--hud-frame-band`, 0 for the bar's, 1 beside navigation) and the measure of the screen on top (`data-measure`): a box of the navigation's width and the room right of it at most (`--hud-frame-room`), centred on the window; the navigation at its start, an aside at its end where one fits (`--hud-frame-aside-shown`), and the column centred in what is between, at most `--hud-frame-content` wide, or on a phone's band `--hud-frame-phone`. Overlays (the pager, a sheet) are drawn inside it, so they are laid out by the same. */ .hud-frame { --hud-frame-aside-shown: 0px; --hud-frame-width: min(100vw, calc(var(--hud-frame-nav) + var(--hud-frame-room))); --hud-frame-start: calc((100vw - var(--hud-frame-width)) / 2); --hud-frame-nav-end: calc(var(--hud-frame-start) + var(--hud-frame-nav)); --hud-frame-main: calc(var(--hud-frame-width) - var(--hud-frame-nav) - var(--hud-frame-aside-shown)); --hud-frame-column-max: calc(var(--hud-frame-band) * var(--hud-frame-content) + (1 - var(--hud-frame-band)) * var(--hud-frame-phone)); --hud-frame-column: min(var(--hud-frame-column-max), var(--hud-frame-main)); --hud-frame-column-start: calc(var(--hud-frame-nav-end) + (var(--hud-frame-main) - var(--hud-frame-column)) / 2); display: contents; }