feat(frontend): switch to the dark graphite design system with a Lincodex wordmark
This commit is contained in:
1 parent
945ab6d6a9
commit
3c4acff803
81 files changed
+3187
-619
No files matched your search
@@ -1,68 +1,118 @@
|
||||
/*
|
||||
* Design tokens of the Lincodex interface.
|
||||
* Design tokens of the Lincodex interface: the dark graphite system from
|
||||
* docs/other/design/DESIGN.md. Dark is the default and the only theme.
|
||||
*
|
||||
* Palette values come from the product requirements (section 5). Only the
|
||||
* light theme exists: dark surfaces are local regions (for example the
|
||||
* employer header) that override the text, link, and focus tokens with
|
||||
* checked pairs. A dark theme must define and check its own pairs instead of
|
||||
* inheriting the light accents. See frontend/README.en.md for the contrast
|
||||
* table of every text and background pair in use.
|
||||
* Contrast rules (every pair is listed in frontend/README.en.md):
|
||||
* - Text tokens reach 4.5:1 on canvas and surface. --color-text-muted and
|
||||
* --color-danger are for canvas and surface only (they drop below 4.5:1 on
|
||||
* the elevated surface).
|
||||
* - The action blue #402fff never carries text on graphite (2.49:1). Text,
|
||||
* rings, strokes, and selected markers use --color-accent (#9a92ff).
|
||||
* - Signal red --color-attention is for 6-8px dots only.
|
||||
* - --color-divider is a decorative hairline. A control whose boundary
|
||||
* identifies it uses --color-border-strong (3:1 on canvas and surface).
|
||||
*
|
||||
* Breakpoints cannot be custom properties inside media queries, so they are
|
||||
* fixed values used directly by components:
|
||||
* 360px - smallest supported width (body min-width: 20rem)
|
||||
* 700px - phone layout ends: (width >= 43.75rem)
|
||||
* 768px - tablet: (width >= 48rem)
|
||||
* 1024px - desktop navigation: (width >= 64rem)
|
||||
* 1280px - wide desktop, verified layout width
|
||||
*/
|
||||
:root {
|
||||
/* Brand palette. Use the semantic tokens below in components. */
|
||||
--palette-violet: #402fff;
|
||||
--palette-red: #ec1d35;
|
||||
color-scheme: dark;
|
||||
|
||||
/* Palette. Components use the semantic tokens below. */
|
||||
--palette-graphite: #1b1c21;
|
||||
--palette-graphite-soft: #2d2e37;
|
||||
--palette-light: #ededed;
|
||||
--palette-grey: #c8c9ca;
|
||||
--palette-graphite-raised: #202129;
|
||||
--palette-graphite-elevated: #2d2e37;
|
||||
--palette-graphite-line: #414246;
|
||||
--palette-graphite-edge: #73757f;
|
||||
--palette-paper: #ededed;
|
||||
--palette-silver: #c8c9ca;
|
||||
--palette-white: #fff;
|
||||
--palette-steel: #9b9c9e;
|
||||
--palette-slate: #878994;
|
||||
--palette-blue: #402fff;
|
||||
--palette-blue-pressed: #3324e0;
|
||||
--palette-violet: #9a92ff;
|
||||
--palette-red: #ec1d35;
|
||||
--palette-signal-red: #ff5a6a;
|
||||
--palette-green: #3ccf7e;
|
||||
|
||||
/* Semantic colors for the light theme. */
|
||||
--color-canvas: var(--palette-light);
|
||||
--color-surface: var(--palette-white);
|
||||
--color-text: var(--palette-graphite);
|
||||
--color-text-secondary: var(--palette-graphite-soft);
|
||||
/* Surfaces: depth comes from steps and hairlines, not from shadows. */
|
||||
--color-canvas: var(--palette-graphite);
|
||||
--color-surface: var(--palette-graphite-raised);
|
||||
--color-surface-elevated: var(--palette-graphite-elevated);
|
||||
--color-surface-hover: var(--palette-graphite-line);
|
||||
--color-surface-tint: rgb(237 237 237 / 6%);
|
||||
--color-surface-tint-hover: rgb(237 237 237 / 10%);
|
||||
--color-inverse: var(--palette-paper);
|
||||
--color-on-inverse: var(--palette-graphite);
|
||||
|
||||
/* Text. */
|
||||
--color-text: var(--palette-paper);
|
||||
--color-text-strong: var(--palette-white);
|
||||
--color-text-secondary: var(--palette-steel);
|
||||
--color-text-muted: var(--palette-slate);
|
||||
|
||||
/* The single action color: primary buttons and active filters. Hover
|
||||
* inverts the button to paper with blue text. */
|
||||
--color-action: var(--palette-blue);
|
||||
--color-action-pressed: var(--palette-blue-pressed);
|
||||
--color-on-action: var(--palette-white);
|
||||
--color-action-hover: var(--palette-paper);
|
||||
--color-on-action-hover: var(--palette-blue);
|
||||
|
||||
/* Readable accent of the action color: text, rings, strokes, stripes,
|
||||
* selected markers. --color-on-accent is text on an accent fill. */
|
||||
--color-accent: var(--palette-violet);
|
||||
--color-on-accent: var(--palette-white);
|
||||
--color-on-accent: var(--palette-graphite);
|
||||
--color-link: var(--palette-violet);
|
||||
--color-link-hover: var(--palette-paper);
|
||||
|
||||
/* Red is reserved for errors and problems. It reaches only 4.38:1 on white,
|
||||
* so it marks error graphics (borders, icons) and never carries body text. */
|
||||
--color-danger: var(--palette-red);
|
||||
/* States. Danger text is the lightened red; the brand red is a dot. */
|
||||
--color-danger: var(--palette-signal-red);
|
||||
--color-danger-tint: rgb(236 29 53 / 16%);
|
||||
--color-danger-wash: rgb(236 29 53 / 8%);
|
||||
--color-success: var(--palette-green);
|
||||
--color-success-tint: rgb(60 207 126 / 14%);
|
||||
--color-attention: var(--palette-red);
|
||||
--color-accent-tint: rgb(64 47 255 / 18%);
|
||||
|
||||
/* Decorative dividers only: grey does not reach 3:1 and must not be the
|
||||
* only boundary of an interactive control. */
|
||||
--color-divider: var(--palette-grey);
|
||||
--color-border-strong: var(--palette-graphite);
|
||||
/* Lines. */
|
||||
--color-divider: var(--palette-graphite-elevated);
|
||||
--color-border-hover: var(--palette-graphite-line);
|
||||
--color-border-strong: var(--palette-graphite-edge);
|
||||
--color-focus-ring: var(--palette-violet);
|
||||
|
||||
/* Typography. Text uses the system stack; JetBrains Mono is self-hosted for
|
||||
* numbers, scores, codes, and pseudonyms. */
|
||||
--font-text:
|
||||
ui-sans-serif, system-ui, -apple-system, "Segoe UI", roboto, "Helvetica Neue", arial, sans-serif;
|
||||
/* Circuit-trace decor: silver at half opacity, as in the design system. */
|
||||
--color-trace: rgb(200 201 202 / 50%);
|
||||
|
||||
/* The only shadow: popovers, menus, and dialogs. */
|
||||
--shadow-popover: 0 16px 40px rgb(0 0 0 / 45%);
|
||||
|
||||
/* Typography. Inter for paragraphs and meta, JetBrains Mono for headings,
|
||||
* labels, buttons, numbers, grades, and stack, Unbounded for the wordmark. */
|
||||
--font-text: inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", roboto, sans-serif;
|
||||
--font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", menlo, consolas, monospace;
|
||||
--font-display: unbounded, var(--font-text);
|
||||
--font-size-xs: 0.8125rem;
|
||||
--font-size-s: 0.9375rem;
|
||||
--font-size-m: 1.0625rem;
|
||||
--font-size-s: 0.875rem;
|
||||
--font-size-m: 1rem;
|
||||
--font-size-l: 1.25rem;
|
||||
--font-size-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
|
||||
--font-size-display: clamp(2rem, 1.45rem + 2.4vw, 3.25rem);
|
||||
--font-size-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
|
||||
--font-size-title: clamp(1.625rem, 1.45rem + 0.8vw, 2rem);
|
||||
--font-size-display: clamp(2rem, 1.3rem + 3vw, 3.375rem);
|
||||
--font-weight-regular: 400;
|
||||
--font-weight-medium: 500;
|
||||
--font-weight-bold: 700;
|
||||
--line-height-tight: 1.1;
|
||||
--font-weight-bold: 600;
|
||||
--line-height-tight: 1.15;
|
||||
--line-height-snug: 1.3;
|
||||
--line-height-body: 1.6;
|
||||
--letter-spacing-display: -0.03em;
|
||||
--letter-spacing-label: 0.08em;
|
||||
--letter-spacing-display: -0.02em;
|
||||
--letter-spacing-label: 0.06em;
|
||||
|
||||
/* Spacing scale with a 4px base. */
|
||||
--space-1: 0.25rem;
|
||||
@@ -75,29 +125,43 @@
|
||||
--space-8: 4rem;
|
||||
--space-9: 6rem;
|
||||
|
||||
/* Radii follow the rounded corners of the brand connector lines. */
|
||||
--radius-s: 0.375rem;
|
||||
--radius-m: 0.75rem;
|
||||
--radius-l: 1.25rem;
|
||||
/* Radii, one rule per element type: controls and tags are capsules,
|
||||
* containers 24, panels 32, surfaces nested in a card 16, objects up to
|
||||
* 24px (checkboxes, keycaps) 6. */
|
||||
--radius-xs: 0.375rem;
|
||||
--radius-s: 1rem;
|
||||
--radius-m: 1.5rem;
|
||||
--radius-l: 2rem;
|
||||
--radius-pill: 999px;
|
||||
|
||||
/* Lines. */
|
||||
/* Lines: hairlines everywhere, the strong line for state stripes. */
|
||||
--line-thin: 1px;
|
||||
--line-strong: 2px;
|
||||
|
||||
/* Focus indicator: 3px ring outside the element. */
|
||||
--focus-ring-width: 3px;
|
||||
/* Focus indicator: 2px violet ring outside the element. */
|
||||
--focus-ring-width: 2px;
|
||||
--focus-ring-offset: 2px;
|
||||
|
||||
/* Layout widths. */
|
||||
/* Layout. */
|
||||
--content-width-narrow: 40rem;
|
||||
--content-width-wide: 80rem;
|
||||
--content-width-wide: 77.5rem;
|
||||
--gutter: var(--space-4);
|
||||
--chrome-inset: 0.625rem;
|
||||
--header-height: 3.5rem;
|
||||
--control-height: 2.75rem;
|
||||
|
||||
/* Motion. Reduced motion collapses durations below. */
|
||||
--duration-fast: 120ms;
|
||||
--duration-base: 220ms;
|
||||
--easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
||||
--duration-fast: 150ms;
|
||||
--duration-base: 200ms;
|
||||
--duration-slow: 400ms;
|
||||
--easing-standard: cubic-bezier(0.25, 0.1, 0.25, 1);
|
||||
--easing-emphasized: cubic-bezier(0.4, 0.24, 0, 1);
|
||||
}
|
||||
|
||||
@media (width >= 43.75rem) {
|
||||
:root {
|
||||
--header-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (width >= 48rem) {
|
||||
@@ -106,9 +170,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (width >= 80rem) {
|
||||
:root {
|
||||
--gutter: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
:root {
|
||||
--duration-fast: 0ms;
|
||||
--duration-base: 0ms;
|
||||
--duration-slow: 0ms;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user