@vegastack/design-tokens 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/base.css CHANGED
@@ -32,6 +32,28 @@
32
32
  UI's Quick Start ("Set up portals"). Consumers importing base.css get this for free; if you
33
33
  don't import base.css, add `isolation: isolate` to your app root yourself. */
34
34
  @apply bg-background text-foreground isolate;
35
+
36
+ /* TYP-17 (ours) — THE DECLARED DEFAULT BODY SIZE, 14px.
37
+ The component layer is 14px (`text-sm`, the dominant size by a wide margin), but nothing
38
+ used to declare a page default, so any text WITHOUT an explicit `text-*` class fell back to
39
+ the browser's 16px and a page mixed two sizes. 14px is the product-UI default Vercel's own
40
+ Geist copy scale is built around.
41
+
42
+ THIS IS DELIBERATELY ON `body`, NEVER ON `html`. `rem` resolves against the ROOT element, so
43
+ `html { font-size: 14px }` would silently rescale the entire system — `text-sm` (0.875rem)
44
+ would become 12.25px and every rem-based spacing token would shrink with it — and it would
45
+ override the reader's own browser font-size preference, which is a WCAG 1.4.4 failure. On
46
+ `body` the root stays 16px, every explicit `text-*` class is untouched, and only unclassed
47
+ text moves. */
48
+ font-size: var(--text-sm, 0.875rem);
49
+
50
+ /* TYP-16 (ours) — Geist is drawn for smoothed rendering. Without this the same weight renders
51
+ heavier and softer on macOS than the identical weight on Vercel's own site, which is a large
52
+ part of why the weight ladder read as "off" before the ramp existed. Upstream sets neither
53
+ property; Tailwind's preflight already handles `-webkit-text-size-adjust` and `tab-size`, so
54
+ those are not restated here. */
55
+ -webkit-font-smoothing: antialiased;
56
+ -moz-osx-font-smoothing: grayscale;
35
57
  }
36
58
  html {
37
59
  @apply font-sans;
package/dist/theme.css CHANGED
@@ -278,6 +278,47 @@
278
278
  --radius-2xl: calc(var(--radius) * 1.8);
279
279
  --radius-3xl: calc(var(--radius) * 2.2);
280
280
  --radius-4xl: calc(var(--radius) * 2.6);
281
+ /* ── TYP-15 (ours) — HEADING TIER OPTICAL METRICS ────────────────────────────────────
282
+ Geist's published spec splits a COPY tier (letter-spacing 0) from a HEADING tier whose
283
+ letter-spacing goes negative as size grows. This system's copy sizes are 12/14/16 —
284
+ exactly Geist's copy tier — so `text-xs`, `text-sm` and `text-base` are NOT declared
285
+ here: they stay stock, untouched, and the 202 component usages of them render
286
+ byte-identically. Restating them at their stock values would be the same dead
287
+ restatement `restated-motion-reduce` and `restated-focus` exist to reject.
288
+
289
+ SIZES ARE STOCK. Only `--line-height` and `--letter-spacing` move, so TYP-1 stays
290
+ **shadcn** and a pasted shadcn snippet still renders at upstream's size. The size is
291
+ restated on each step anyway because a modifier with no base is meaningless to read,
292
+ and it pins the ramp against a future Tailwind default change.
293
+
294
+ Two of these go LOOSER, not tighter. Stock Tailwind collapses 3xl-7xl toward 1.0, which
295
+ clips Geist's descenders once negative tracking pulls the glyphs together; Vercel runs
296
+ 48px at 56px leading, not 48. And stock `text-lg` (1.556) is looser than `text-base`
297
+ (1.5) — non-monotonic, and backwards from the shape this ramp exists to produce. */
298
+ --text-lg: 1.125rem;
299
+ --text-lg--line-height: 1.625rem;
300
+ --text-lg--letter-spacing: -0.012em;
301
+ --text-xl: 1.25rem;
302
+ --text-xl--line-height: 1.625rem;
303
+ --text-xl--letter-spacing: -0.02em;
304
+ --text-2xl: 1.5rem;
305
+ --text-2xl--line-height: 2rem;
306
+ --text-2xl--letter-spacing: -0.04em;
307
+ --text-3xl: 1.875rem;
308
+ --text-3xl--line-height: 2.375rem;
309
+ --text-3xl--letter-spacing: -0.04em;
310
+ --text-4xl: 2.25rem;
311
+ --text-4xl--line-height: 2.75rem;
312
+ --text-4xl--letter-spacing: -0.05em;
313
+ --text-5xl: 3rem;
314
+ --text-5xl--line-height: 3.5rem;
315
+ --text-5xl--letter-spacing: -0.06em;
316
+ --text-6xl: 3.75rem;
317
+ --text-6xl--line-height: 4rem;
318
+ --text-6xl--letter-spacing: -0.06em;
319
+ --text-7xl: 4.5rem;
320
+ --text-7xl--line-height: 4.5rem;
321
+ --text-7xl--letter-spacing: -0.06em;
281
322
  --font-sans: var(--font-family-sans);
282
323
  --font-mono: var(--font-family-mono);
283
324
  --font-serif: var(--font-family-serif);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vegastack/design-tokens",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "VegaStack design tokens (DTCG → Tailwind v4 theme + TS)",
5
5
  "license": "MIT",
6
6
  "repository": {