/* The design tokens every rule in app.css draws from: a value the pages use goes here once, named for what it is for, and rules take it by name. Colours change with the colour scheme; the scales do not. The one breakpoint, which a custom property cannot name: 640px. The look: warm paper rather than a white sheet, cards lifted softly off it, and one colour that acts, terracotta, so what to press is never in doubt. Headings take the system's rounded face where it has one: the console loads no fonts of its own. The paper, cards, lines and ink are the palette's: a hue and a chroma (`--palette-h`, `--palette-c`) over one ladder of lightness, so every palette reads with the same contrast. Paper, the console's own, is warm and strong; a host's other palettes (PALETTE, chosen by the page's ``) are fainter, as tinted grays are. */ :root { --palette-h: 70; --palette-c: 0.028; } [data-palette='slate'] { --palette-h: 260; --palette-c: 0.01; } [data-palette='neutral'] { --palette-h: 0; --palette-c: 0; } [data-palette='sage'] { --palette-h: 155; --palette-c: 0.009; } [data-palette='mauve'] { --palette-h: 310; --palette-c: 0.01; } /* Each colour once, as light-dark(light, dark): the page's colour scheme picks, as the reader's device has it, or as they chose under Appearance (``). */ :root { color-scheme: light dark; /* Hues, each meaning one thing wherever it shows. */ --green: light-dark(#2f7a4b, #5cc483); --red: light-dark(#b9382c, #ff7b6b); --purple: light-dark(#6a4bb0, #b39dff); --yellow: light-dark(#94620a, #e0a83a); --gray: light-dark( oklch(0.51 calc(var(--palette-c) * 0.83) var(--palette-h)), oklch(0.686 calc(var(--palette-c) * 1.07) var(--palette-h)) ); /* Surfaces, from the page up: the paper, a card on it, a well in a card, its edges. */ --bg: light-dark( oklch(0.96 calc(var(--palette-c) * 0.4) var(--palette-h)), oklch(0.187 calc(var(--palette-c) * 0.41) var(--palette-h)) ); --panel: light-dark( oklch(0.995 calc(var(--palette-c) * 0.16) var(--palette-h)), oklch(0.223 calc(var(--palette-c) * 0.48) var(--palette-h)) ); --soft: light-dark( oklch(0.938 calc(var(--palette-c) * 0.57) var(--palette-h)), oklch(0.259 calc(var(--palette-c) * 0.63) var(--palette-h)) ); --line: light-dark( oklch(0.902 calc(var(--palette-c) * 0.74) var(--palette-h)), oklch(0.301 calc(var(--palette-c) * 0.77) var(--palette-h)) ); --line-strong: light-dark( oklch(0.84 var(--palette-c) var(--palette-h)), oklch(0.37 calc(var(--palette-c) * 0.96) var(--palette-h)) ); /* Text: the body, then quieter for what is said about it, then quieter still. */ --fg: light-dark( oklch(0.256 calc(var(--palette-c) * 0.72) var(--palette-h)), oklch(0.947 calc(var(--palette-c) * 0.57) var(--palette-h)) ); --mute: light-dark( oklch(0.44 calc(var(--palette-c) * 0.85) var(--palette-h)), oklch(0.737 calc(var(--palette-c) * 1.08) var(--palette-h)) ); --faint: light-dark( oklch(0.502 var(--palette-c) var(--palette-h)), oklch(0.64 calc(var(--palette-c) * 1.1) var(--palette-h)) ); /* What acts: a button's fill and the text on it, its hover, a soft wash of it behind what it marks, and the edge of what has focus. */ --primary: light-dark(#b8482b, #f08a63); --primary-hover: light-dark(#9c3b22, #ffa07c); --on-primary: light-dark(#fff, #23120a); --primary-soft: light-dark(#f8e3da, #3b2219); --link-line: light-dark(#d9a593, #7a4a38); /* A card lifted off the paper, and a dialog lifted off the page. */ --shadow: 0 1px 2px light-dark(oklch(0.33 calc(var(--palette-c) * 1.8) var(--palette-h) / 6%), rgb(0 0 0 / 35%)), 0 6px 20px light-dark(oklch(0.33 calc(var(--palette-c) * 1.8) var(--palette-h) / 6%), rgb(0 0 0 / 25%)); --shadow-pop: 0 2px 6px light-dark(oklch(0.33 calc(var(--palette-c) * 1.8) var(--palette-h) / 10%), rgb(0 0 0 / 40%)), 0 24px 64px light-dark(oklch(0.33 calc(var(--palette-c) * 1.8) var(--palette-h) / 22%), rgb(0 0 0 / 55%)); /* What dims the page behind a dialog. */ --scrim: light-dark( oklch(0.256 calc(var(--palette-c) * 0.72) var(--palette-h) / 35%), rgb(0 0 0 / 55%) ); /* A picture's stand-in, where there is none: its initial, on a wash of a hue of its own (a lightness and chroma, the hue its name's), light then dark. Not colours, so not light-dark(): `span.av` picks. */ --initial-wash: 90% 0.045; --initial-wash-dark: 34% 0.05; --initial-ink: 42% 0.09; --initial-ink-dark: 86% 0.07; /* What a colour is for, over the hues above: the pages take these, never a hue. */ --success: var(--green); --danger: var(--red); --danger-soft: light-dark(#f9e2df, #3d1d19); --on-danger: light-dark(#fff, #23120a); --attention: var(--yellow); --done: var(--purple); --neutral: var(--gray); } [data-theme='light'] { color-scheme: light; } [data-theme='dark'] { color-scheme: dark; } :root { --border: 1px solid var(--line); --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; --font-round: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', system-ui, -apple-system, sans-serif; --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; /* The initial of a person named in a line of text. */ --text-2xs: 10px; --text-xs: 12px; --text-sm: 13px; --text-base: 15px; --text-lg: 17px; --text-xl: 20px; --text-2xl: 28px; /* A page's one heading, for someone not signed in: the host's, and a group's handle. */ --text-3xl: 40px; --text-hero: 52px; /* What is typed into a field: 16px on a phone, so Safari does not zoom to it. */ --text-field: var(--text-base); --leading: 1.6; --leading-tight: 1.2; --weight-normal: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700; --tracking-tight: -0.02em; --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-16: 4rem; --radius-xs: 3px; --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius-pill: 999px; --control: 40px; /* A button in a row of a list, beside what it acts on. */ --control-sm: 32px; --avatar: 24px; /* A person named in a line of text: their picture, small, before their handle. */ --avatar-sm: 18px; /* Something waiting for whoever is signed in, marked on their picture. */ --dot: 10px; --avatar-md: 44px; --avatar-lg: 88px; /* An account suggested under a field for a handle. */ --avatar-pick: 32px; /* A small picture set in a line of text: a link's mark. */ --icon: 14px; /* An icon beside a row's title, as what an app would get is listed. */ --icon-lg: 22px; /* A column of ticks, as Create, Update and Delete are. */ --tick-column: 4.5rem; /* A picture a moderator reviews, at its tallest. */ --review-picture: 16rem; --header: 4rem; /* The host's logo beside its name in the header. */ --logo: 28px; --page: 46rem; --dialog: 26rem; /* A menu dropped from the header. */ --menu: 15rem; --drop-list: 16rem; /* A line of prose at its longest, set larger than the body. */ --measure: 32rem; --ring: 3px; --speed: 120ms; /* The Atmosphere's apps in the sign-in dialog: each icon, and the time the row takes to run past once. */ --app-icon: 40px; --apps-run: 60s; /* What a mask lets through, wholly: no colour is drawn with it. */ --opaque: #000; /* How far a row that scrolls sideways fades at an edge with more past it. */ --row-fade: var(--space-8); /* How far down the screen a dialog opens. */ --dialog-top: 12vh; } @media (max-width: 640px) { :root { --text-field: var(--text-lg); --text-2xl: 24px; --text-3xl: 28px; --text-hero: 36px; --avatar-lg: 72px; --dialog-top: var(--space-6); } }