|
20 | 20 | --shadow-color-strong: color-mix(in oklab, oklch(15% 0.01 264) 18%, transparent); |
21 | 21 | --shadow-color-subtle: color-mix(in oklab, oklch(20% 0.01 264) 6%, transparent); |
22 | 22 |
|
| 23 | + // Four steps, deliberately not five: shadows are reserved for true panels |
| 24 | + // and overlays here — rows and tags are divided by rules instead — so an |
| 25 | + // elevation scale long enough for a card-based grammar is a scale that |
| 26 | + // gets used like one. --shadow-xl (the fifth) was removed in 2.10: it was |
| 27 | + // referenced by nothing in any of the three repos. |
| 28 | + // xs — hairline lift on quiet chrome sm — panels (--panel-shadow) |
| 29 | + // md — hover / raised panels lg — overlays: drawer, modal |
23 | 30 | --shadow-xs: 0 1px 2px 0 var(--shadow-color-subtle); |
24 | 31 | --shadow-sm: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color-subtle); |
25 | 32 | --shadow-md: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color-subtle); |
26 | 33 | --shadow-lg: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color-subtle); |
27 | | - --shadow-xl: 0 20px 25px -5px var(--shadow-color), 0 10px 10px -5px var(--shadow-color-subtle); |
28 | 34 |
|
29 | 35 | --panel-bg: var(--surface); |
30 | 36 | // See the note in :root — re-declare so the inner var() resolves against |
|
62 | 68 | // ======================================================================== |
63 | 69 | // Border Radius Scale |
64 | 70 | // ======================================================================== |
65 | | - --radius-sm: 0.375rem; // 6px |
66 | | - --radius-md: 0.5rem; // 8px — tightened from 12px to feel more |
67 | | - // institutional/instrument-like, less consumer |
68 | | - --radius-lg: 0.75rem; // 12px |
69 | | - --radius-xl: 1rem; // 16px |
70 | | - --radius-full: 9999px; |
| 71 | + // Three non-pill steps, each with ONE job. A rules-not-boxes system that |
| 72 | + // publishes four interchangeable radii invites four different answers to |
| 73 | + // the same question — which is how maps ended up at 6px, cards at 8px and |
| 74 | + // the compact search panel at 12px on the same page. |
| 75 | + --radius-sm: 0.375rem; // 6px — inline marks: chips, tags, map controls |
| 76 | + --radius-md: 0.5rem; // 8px — DEFAULT for panels, controls, inputs. |
| 77 | + // Tightened from 12px to feel more |
| 78 | + // institutional/instrument-like, less consumer. |
| 79 | + --radius-lg: 0.75rem; // 12px — media only: figures, thumbnails, carousel |
| 80 | + // plates. A photograph reads as matted, not as a |
| 81 | + // card; nothing that is chrome may use this. |
| 82 | + --radius-full: 9999px; // pills |
| 83 | + // (--radius-xl, 16px, removed in 2.10 — declared, referenced by nothing in |
| 84 | + // any of the three repos, and one more way to disagree about a corner.) |
71 | 85 |
|
72 | 86 | // ======================================================================== |
73 | 87 | // Accent Lines & Lift |
|
103 | 117 | --measure-wide: 72.5rem; // ~1160px — search results, wide lists |
104 | 118 |
|
105 | 119 | // ======================================================================== |
106 | | - // Focus Rings |
107 | | - // ======================================================================== |
108 | | - --ring-focus: 0 0 0 3px var(--focus-ring); |
| 120 | + // Focus — ONE decision, two idioms, and a rule for picking between them. |
| 121 | + // |
| 122 | + // --focus-outline DEFAULT. `outline` + `outline-offset: 2px`. Use it |
| 123 | + // unless the element is clipped. |
| 124 | + // --ring-focus The box-shadow ring, for when an outline would be |
| 125 | + // clipped: inside `overflow: hidden`, inside a scroll |
| 126 | + // container, or on an element flush against a panel |
| 127 | + // edge. --ring-focus-sm is the tighter 2px version for |
| 128 | + // dense controls. |
| 129 | + // --focus-color the colour. --focus-ring-color is the translucent |
| 130 | + // tint --ring-focus is built from; consuming it |
| 131 | + // directly is almost always a mistake. |
| 132 | + // |
| 133 | + // The four names used to be --focus-color / --focus-ring / --ring-focus / |
| 134 | + // --ring-focus-sm with nothing saying which applied when, and --focus-ring |
| 135 | + // vs --ring-focus one transposition apart. The result downstream was |
| 136 | + // `outline: 2px solid var(--focus-color, var(--primary, #ce4115))` |
| 137 | + // hand-copied 44 times across IwacVisualizations' block stylesheets — |
| 138 | + // because there was no token for the composed outline, only for its |
| 139 | + // colour. --focus-outline is that token. |
| 140 | + // ======================================================================== |
| 141 | + --focus-outline: 2px solid var(--focus-color); |
| 142 | + --ring-focus: 0 0 0 3px var(--focus-ring-color); |
109 | 143 | --ring-focus-sm: 0 0 0 2px color-mix(in oklab, var(--primary) 22%, transparent); |
110 | 144 |
|
111 | 145 | // ======================================================================== |
|
123 | 157 | --tracking-wider: 0.08em; |
124 | 158 |
|
125 | 159 | // ======================================================================== |
126 | | - // Glow Effects (primary-tinted shadows for buttons/accents) |
| 160 | + // Glow (primary-tinted shadow) — ONE effect, three states. |
| 161 | + // |
| 162 | + // Not an elevation scale: xs/sm/md are the active / rest / hover states of |
| 163 | + // the single filled button (see base/elements/_buttons.scss, which is the |
| 164 | + // only sanctioned consumer). Nothing else in the system glows. |
127 | 165 | // Derived from --primary so admin color overrides cascade through. |
128 | 166 | // ======================================================================== |
129 | 167 | --glow-xs: 0 1px 3px 0 color-mix(in oklab, var(--primary) 20%, transparent); |
|
184 | 222 | --shadow-sm: 0 2px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color-subtle); |
185 | 223 | --shadow-md: 0 6px 16px -4px var(--shadow-color-strong), 0 4px 8px -4px var(--shadow-color-strong); |
186 | 224 | --shadow-lg: 0 12px 28px -8px color-mix(in oklab, black 35%, transparent), 0 8px 16px -8px color-mix(in oklab, black 20%, transparent); |
187 | | - --shadow-xl: 0 20px 40px -12px color-mix(in oklab, black 45%, transparent), 0 12px 24px -8px var(--shadow-color-strong); |
188 | 225 |
|
189 | 226 | --panel-bg: var(--surface-raised); |
190 | 227 | // See comment in :root block — re-declare for dark cascade. |
|
0 commit comments