~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
155 lines · 4.4 KB Raw History
/* The design tokens every rule 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. */

:root {
	color-scheme: light;

	/* Hues, each meaning one thing wherever it shows. */
	--green: #1a7f37;
	--red: #cf222e;
	--yellow: #9a6700;
	--gray: #636363;

	/* Surfaces, from the page up: what is raised is darker in light, lighter in
	   dark. Monolith's: near-black in dark, warm paper in light, no hue. */
	--bg: #fafaf8;
	--panel: #f3f3ef;
	--soft: #ebebe6;
	--hover: var(--soft);
	--line: #dcdcd6;
	/* The edge of a field, which must show where to type. */
	--field-line: #a8a8a2;

	/* Text: the body, then quieter for what is said about it, then quieter still. */
	--fg: #111110;
	--mute: #45453f;
	--faint: #5c5c56;

	/* What acts: a primary button's fill and the text on it, and the edge of
	   what has focus. Monolith's ink: the text colour itself, so the one
	   button that goes on is the darkest thing on a light page and the
	   lightest on a dark one. A link is underlined in --link-line. */
	--primary: #111110;
	--primary-hover: #2a2a28;
	--on-primary: #fafaf8;
	--link-line: #a8a8a2;
	/* The accent: what marks rather than acts, such as the server's host. */
	--accent: #111110;
	--accent-soft: #e4e4de;

	/* What a colour is for, as GitHub's Primer names it, over the hues
	   above: rules take these, never a hue. */
	--success: var(--green);
	--danger: var(--red);
	--attention: var(--yellow);
	--neutral: var(--gray);
	/* An alert's box: its fill and edge, under --danger text. */
	--danger-soft: #ffebe9;
	--danger-line: #ffc1ba;

	--ring-color: rgb(17 17 16 / 0.15);
	--shadow-pop: 0 8px 24px rgb(0 0 0 / 0.12), 0 1px 2px rgb(0 0 0 / 0.06);
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--green: #3fb950;
		--red: #f85149;
		--yellow: #d29922;
		--gray: #9198a1;
		--bg: #050505;
		--panel: #0d0d0c;
		--soft: #161615;
		--line: #262624;
		--field-line: #4a4a46;
		--fg: #e8e8e4;
		--mute: #bdbdb7;
		--faint: #8a8a84;
		--primary: #e8e8e4;
		--primary-hover: #ffffff;
		--on-primary: #050505;
		--link-line: #5a5a56;
		--accent: #e8e8e4;
		--accent-soft: #1c1c1b;
		--danger-soft: #2d1416;
		--danger-line: #5c2327;
		--ring-color: rgb(232 232 228 / 0.25);
		--shadow-pop: 0 8px 24px rgb(0 0 0 / 0.5), 0 0 0 1px rgb(255 255 255 / 0.02);
	}
}

:root {
	--ring: 0 0 0 3px var(--ring-color);

	/* Monolith's typefaces (app.css serves them from the build): Space
	   Grotesk for text, JetBrains Mono for what acts and for names. */
	--font-sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	/* Letter spacing: mono set a little open, the host's line more, a heading
	   drawn in, and a code to read out set wide. */
	--tracking-mono: 0.02em;
	--tracking-wide: 0.04em;
	--tracking-tight: -0.01em;
	--tracking-code: 0.18em;

	--text-xs: 12px;
	--text-sm: 13px;
	--text-base: 14px;
	--text-md: 15px;
	--text-lg: 16px;
	--text-xl: 18px;
	--text-2xl: 20px;
	--text-3xl: 24px;
	/* What a field's text is: 16px on a phone, below which iOS zooms in on focus. */
	--text-field: var(--text-base);
	--leading: 1.55;
	--leading-tight: 1.25;
	/* Small text in a list, read line by line but held close. */
	--leading-snug: 1.4;
	--weight-normal: 400;
	--weight-medium: 500;
	--weight-semibold: 600;

	--space-0-5: 0.125rem;
	--space-1: 0.25rem;
	--space-1-5: 0.375rem;
	--space-2: 0.5rem;
	--space-2-5: 0.625rem;
	--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;

	/* Monolith's edges are square; only the pictures beside names are round. */
	--radius-xs: 0;
	--radius-sm: 0;
	--radius-md: 0;
	--radius-lg: 0;
	--radius-full: 999px;

	/* The card every view is drawn in, and the pictures beside names. */
	--card-width: 26rem;
	--avatar: 2rem;
	/* The column of a caption beside what it names, as App beside the client. */
	--caption-width: 4rem;
	--control-height: 2.25rem;

	/* Edges: a border, and the outline of what has focus and its gap. */
	--border: 1px;
	--focus-width: 2px;
	--focus-offset: 2px;
	/* How much of a disabled control shows. */
	--disabled: 0.5;
}

@media (max-width: 640px) {
	:root {
		--text-field: var(--text-lg);
	}
}