@fusion.dev/helix-templates 0.236.0 → 0.237.1

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.
Files changed (34) hide show
  1. package/package.json +1 -1
  2. package/templates/angular/package.json +7 -0
  3. package/templates/angular/src/app/landing.html +10 -2
  4. package/templates/angular/src/app/overview.html +1 -1
  5. package/templates/angular/src/app/signup-form.html +7 -3
  6. package/templates/angular/src/app/signup-form.ts +3 -3
  7. package/templates/angular/src/app.css +120 -11
  8. package/templates/angular/src/main.ts +10 -1
  9. package/templates/react-nextjs/app/app.css +120 -11
  10. package/templates/react-nextjs/app/landing.tsx +4 -2
  11. package/templates/react-nextjs/app/overview.tsx +8 -7
  12. package/templates/react-nextjs/app/signup-form.tsx +12 -6
  13. package/templates/react-nextjs/next.config.ts +7 -0
  14. package/templates/react-nextjs/package.json +7 -0
  15. package/templates/react-vite/src/app.css +120 -11
  16. package/templates/react-vite/src/landing.tsx +4 -2
  17. package/templates/react-vite/src/overview.tsx +8 -7
  18. package/templates/react-vite/src/signup-form.tsx +12 -6
  19. package/templates/react-vite/vite.config.ts +11 -1
  20. package/templates/solid-vite/src/app.css +120 -11
  21. package/templates/solid-vite/src/landing.tsx +4 -2
  22. package/templates/solid-vite/src/overview.tsx +1 -1
  23. package/templates/solid-vite/src/signup-form.tsx +8 -6
  24. package/templates/solid-vite/vite.config.ts +11 -1
  25. package/templates/svelte-vite/src/Landing.svelte +4 -2
  26. package/templates/svelte-vite/src/Overview.svelte +1 -1
  27. package/templates/svelte-vite/src/SignupForm.svelte +10 -6
  28. package/templates/svelte-vite/src/app.css +120 -11
  29. package/templates/svelte-vite/vite.config.ts +11 -1
  30. package/templates/vue-vite/src/LandingPage.vue +4 -2
  31. package/templates/vue-vite/src/OverviewPage.vue +1 -1
  32. package/templates/vue-vite/src/SignupForm.vue +8 -6
  33. package/templates/vue-vite/src/app.css +120 -11
  34. package/templates/vue-vite/vite.config.ts +11 -0
@@ -18,7 +18,8 @@
18
18
  /** One message in the toast region, and what it says. */
19
19
  interface Message {
20
20
  readonly id: number
21
- readonly text: string
21
+ /** The answers, one `name=value` pair each, so a line breaks only between pairs. */
22
+ readonly pairs: readonly string[]
22
23
  }
23
24
 
24
25
  let handle = $state('')
@@ -32,8 +33,7 @@
32
33
  event.preventDefault()
33
34
  const answers = [...new FormData(event.currentTarget as HTMLFormElement).entries()]
34
35
  .map(([field, value]) => `${field}=${value}`)
35
- .join(' ')
36
- messages = [...messages, { id: Date.now(), text: answers }]
36
+ messages = [...messages, { id: Date.now(), pairs: answers }]
37
37
  }
38
38
 
39
39
  /**
@@ -106,8 +106,8 @@
106
106
  <aside class="notes">
107
107
  <!-- The one fact you need before typing your name into a page you have
108
108
  had for five minutes, so it is a callout. `neutral` is a note that
109
- reports no status, drawn in the muted ink with a bar on the inline
110
- start, so it stays in the palette, ink or brand. -->
109
+ reports no status, drawn as a tint of the muted ink with a hairline of
110
+ it around the box, so it stays in the palette, ink or brand. -->
111
111
  <helix-callout tone="neutral">
112
112
  The form posts nothing. Submit it, and a message shows exactly what a server would receive.
113
113
  </helix-callout>
@@ -139,7 +139,11 @@
139
139
  >
140
140
  <helix-flex direction="column" gap="2xs">
141
141
  <helix-text scale="body-strong">Read by the form</helix-text>
142
- <helix-text scale="code">{message.text}</helix-text>
142
+ <helix-flex column-gap="md" wrap>
143
+ {#each message.pairs as pair (pair)}
144
+ <helix-text scale="code">{pair}</helix-text>
145
+ {/each}
146
+ </helix-flex>
143
147
  </helix-flex>
144
148
  </helix-toast-item>
145
149
  {/each}
@@ -11,7 +11,7 @@
11
11
  * `:root`, and every token follows it.
12
12
  *
13
13
  * **Color appears in two places, and both are named.** Each tile's icon takes
14
- * `--helix-color-primary` on `--helix-color-primary-subtle`, and a chosen row
14
+ * `--helix-color-brand-mark` on `--helix-color-primary-subtle`, and a chosen row
15
15
  * takes `--helix-color-primary-subtle` through the parts the table publishes.
16
16
  * Everywhere else the page is the foreground on the background, and the
17
17
  * components carry their own color.
@@ -140,10 +140,46 @@ helix-app-header {
140
140
  and faded out behind the words so they keep their contrast: it is at full
141
141
  strength only behind the card, which is below the words in one column and
142
142
  beside them in two. */
143
+ /*
144
+ * **On a light page the light is a pale sheen on the page itself.** By default
145
+ * an aura ramps from the page up to `primary`, which in dark is light on black.
146
+ * In light that ramp runs from white to a dark color, and with no brand it drew
147
+ * a gray smoke behind the card: at 390 the muted stat labels sat on #cccccc at
148
+ * 3.7:1. Turned around, from a tint up to white, it laid a #d1d1d1 slab over
149
+ * the end of the hero that read as a smudge. Now the ground is the page, the
150
+ * strands are `primary-subtle`, and their cores take a third of `primary`, so
151
+ * only the strokes show: at 1440 the darkest is #bebebe, 1.86:1, on a thin
152
+ * line, and the strip beside the card stays white where the slab covered 93%
153
+ * of it. A brand colors the strokes. The second half of each pair is the
154
+ * aura's own default, so dark is unchanged.
155
+ *
156
+ * **Side by side, the light starts at 45% of the panel's width.** From 35%, the
157
+ * dark plume reached the end of the lede's lines, and the lede measured 3.84:1
158
+ * against the brightest pixel behind it at 1440. From 45% it measures 8.9:1, and
159
+ * the light reaches full strength at 75%, behind the card.
160
+ *
161
+ * **In one column, the light is measured up from the bottom edge**, so it
162
+ * starts under the actions however the words above them wrap. From 40% of the
163
+ * panel's height, the bright plume passed behind "Open the form" at 390: in dark
164
+ * its label fell to 5.33:1 against the brightest pixel behind it, and its edge
165
+ * to 1.02:1, gone. The light now fades in from 14rem above the bottom, under the
166
+ * actions, and is at full strength from 7rem, behind the card.
167
+ */
143
168
  .first-light {
169
+ --aura-ground: var(--helix-color-background);
170
+ --aura-glow: light-dark(var(--helix-color-primary-subtle), var(--helix-color-primary));
171
+ --aura-haze: light-dark(
172
+ color-mix(in oklab, var(--helix-color-primary-subtle) 50%, var(--helix-color-background)),
173
+ var(--helix-color-primary-subtle)
174
+ );
175
+ --aura-peak: light-dark(
176
+ color-mix(in oklab, var(--helix-color-primary) 34%, var(--helix-color-primary-subtle)),
177
+ var(--helix-color-foreground)
178
+ );
179
+
144
180
  block-size: auto;
145
181
  inset: 0;
146
- mask-image: linear-gradient(to bottom, transparent 40%, black 80%);
182
+ mask-image: linear-gradient(to top, black 7rem, transparent 14rem);
147
183
  pointer-events: none;
148
184
  position: absolute;
149
185
  z-index: var(--helix-layer-beneath);
@@ -151,10 +187,18 @@ helix-app-header {
151
187
 
152
188
  @media (width >= 60rem) {
153
189
  .first-light {
154
- mask-image: linear-gradient(to right, transparent 35%, black 70%);
190
+ mask-image: linear-gradient(to right, transparent 45%, black 75%);
155
191
  }
156
192
  }
157
193
 
194
+ /* **The pause control lines up with the card's trailing edge**, at the panel's
195
+ inline padding, where the aura's own corner put it 12 pixels from the
196
+ panel's edge. At 390 that left it 12 pixels past the card's edge and 4 under
197
+ the card, and its 44-pixel press box overlapped the card by 2. */
198
+ .first-light::part(pause) {
199
+ inset-inline-end: var(--helix-space-2xl);
200
+ }
201
+
158
202
  /* A heading and the lines around it are one block, with a smaller gap than the
159
203
  one between blocks. Every route opens with one. */
160
204
  .hero {
@@ -164,11 +208,17 @@ helix-app-header {
164
208
  }
165
209
 
166
210
  /* The first screen's heading takes more room around it than a route's, and
167
- its lede a step more size, wrapped to even lines. */
211
+ its lede a step more size. Both wrap to even lines where they wrap. Balance
212
+ cannot split three words evenly, so on a phone the heading takes a smaller
213
+ size, below. */
168
214
  .first-screen .hero {
169
215
  gap: var(--helix-space-md);
170
216
  }
171
217
 
218
+ .first-screen .hero > [as="h1"] {
219
+ text-wrap: balance;
220
+ }
221
+
172
222
  .first-screen .lede {
173
223
  font-size: var(--helix-text-lg);
174
224
  text-wrap: balance;
@@ -224,12 +274,14 @@ helix-app-header {
224
274
  block-size: 100%;
225
275
  }
226
276
 
227
- /* Each tile's icon, on a tint of the brand. */
277
+ /* Each tile's icon, on a tint of the brand. The icon is a graphic, so it takes
278
+ `brand-mark`, the brand as a graphic: a graphic needs 3:1 where text needs
279
+ 4.5:1, so a theme can set it nearer the color you chose than `primary`. */
228
280
  .feature-mark {
229
281
  --icon-size: 1.25rem;
230
282
  background-color: var(--helix-color-primary-subtle);
231
283
  border-radius: var(--helix-radii-md);
232
- color: var(--helix-color-primary);
284
+ color: var(--helix-color-brand-mark);
233
285
  display: inline-flex;
234
286
  inline-size: fit-content;
235
287
  padding: var(--helix-space-xs);
@@ -280,9 +332,17 @@ helix-app-header {
280
332
 
281
333
  /* The callout takes the column, which `start` above would otherwise size to its
282
334
  own words: a notice narrower than the paragraph under it reads as a stray. The
283
- link beside it is meant to be its own width. */
335
+ link beside it is meant to be its own width.
336
+
337
+ **The notes' text size, and a step more room under it.** A callout draws at
338
+ the control size, 13px, which beside the notes' 14px read as a smaller voice
339
+ for the one fact that matters. And at the column's 12px gap the heading sat as
340
+ close to the callout as to its own paragraph, so it belonged to neither; 24px
341
+ above it and 12 below tie it to what it heads. */
284
342
  .notes > helix-callout {
343
+ --callout-font-size: var(--helix-text-md);
285
344
  inline-size: 100%;
345
+ margin-block-end: var(--helix-space-sm);
286
346
  }
287
347
 
288
348
  /*
@@ -310,17 +370,66 @@ helix-app-header {
310
370
  display: flex;
311
371
  flex-wrap: wrap;
312
372
  gap: var(--helix-space-md);
373
+ /* Wide enough on a touch screen for the press areas below to meet without
374
+ overlapping, where the links wrap onto a second row. */
375
+ row-gap: max(var(--helix-space-md), calc(var(--helix-size-target) - 1lh));
376
+ }
377
+
378
+ /*
379
+ * **A link reaches the touch target in a transparent box**, as Helix's own row
380
+ * of destinations does, so nothing drawn moves. On a 390 phone the wordmark and
381
+ * the footer links were 21 pixels tall and "React" 37 wide, against a 44-pixel
382
+ * target. The box grows only on the axis the link is short on, into the bar's
383
+ * padding and the gap between links, and `--helix-size-target` is 44 only on a
384
+ * coarse pointer.
385
+ */
386
+ .wordmark,
387
+ .footer-links a {
388
+ position: relative;
389
+ }
390
+
391
+ .wordmark::after,
392
+ .footer-links a::after {
393
+ content: "";
394
+ inset-block: min(0px, calc((100% - var(--helix-size-target)) / 2));
395
+ inset-inline: min(0px, calc((100% - var(--helix-size-target)) / 2));
396
+ position: absolute;
313
397
  }
314
398
 
315
399
  /*
316
400
  * **Narrow, the gutter gives first.** 24 pixels either side of a 390 window
317
- * spend 48 of 390 on margin, and the table needs 355 of what is left. At `md` it
318
- * has 358 and fits; at `lg` it was 13 pixels short, and the last column sat
319
- * outside the box until you scrolled the table sideways.
401
+ * spend 48 of 390 on margin, and the table needs 355 of what is left. At `lg`
402
+ * it was 13 pixels short, and the last column sat outside the box until you
403
+ * scrolled the table sideways. At `md`, 16, the table has 358 and every row
404
+ * holds one line, 40 under a mouse and 45 on a touch screen, in Chromium and
405
+ * WebKit alike. The header, the page, and the footer keep one edge.
320
406
  */
321
407
  @media (width < 40rem) {
408
+ /* **Room under the card for the pause control**: the control, and a 12-pixel
409
+ gap on each side of it. The panel's 48 put the control 4 pixels under the
410
+ card. */
322
411
  .first-screen {
323
- padding: var(--helix-space-2xl) var(--helix-space-lg);
412
+ padding: var(--helix-space-2xl) var(--helix-space-lg)
413
+ calc(var(--helix-size-control-sm) + var(--helix-space-sm) * 2);
414
+ }
415
+
416
+ .first-light::part(pause) {
417
+ inset-inline-end: var(--helix-space-lg);
418
+ }
419
+
420
+ /* **The heading a step down, so it is one line at 390.** At the display
421
+ size, 42px, "Helix design system" is 370 pixels wide in a 316 pixel
422
+ column, and balance broke it as "Helix design" over a lone "system". At
423
+ `2xl`, 32px, it is 282 pixels wide. Narrower than that, it balances again. */
424
+ .first-screen .hero > [as="h1"] {
425
+ --text-font-size: var(--helix-text-2xl);
426
+ }
427
+
428
+ /* One step less between blocks, as the gutter gives: 64 pixels between the
429
+ first screen and the section under it was more than a phone screen's
430
+ blocks need, so the page reads 48. */
431
+ .stack {
432
+ gap: var(--helix-space-2xl);
324
433
  }
325
434
 
326
435
  .page {
@@ -1,7 +1,17 @@
1
1
  import { svelte } from '@sveltejs/vite-plugin-svelte'
2
2
  import { defineConfig } from 'vite'
3
3
 
4
+ /* **The browsers that have `light-dark()`**, which every Helix color token is
5
+ written with. Vite's default targets reach back to Safari 16.4, so a
6
+ production build rewrites each `light-dark()` into a fallback that resolves
7
+ on the root element. A Toast then draws in the page's mode, white on a white
8
+ page, and so does a `data-color-mode` panel. The development server does not
9
+ minify CSS, so only a build shows it. Safari 18 and Firefox 128 are the
10
+ first with relative colors, `oklch(from ...)`, which the brand ramp is
11
+ built from. */
12
+ const cssTarget = ['chrome123', 'edge123', 'firefox128', 'safari18', 'ios18']
13
+
4
14
  /* Svelte needs no setting for custom elements: it sets a property where the
5
15
  element has one, an attribute otherwise, and binds `on*` with
6
16
  `addEventListener`. */
7
- export default defineConfig({ plugins: [svelte()] })
17
+ export default defineConfig({ build: { cssTarget }, plugins: [svelte()] })
@@ -25,8 +25,10 @@ const figure = new Intl.NumberFormat('en-US')
25
25
  <!-- **The light behind the first screen**: a helix, drawn by the library in
26
26
  the theme's colors, so a new brand color relights it. It shows one still
27
27
  frame where motion is reduced, and a gradient where the browser draws
28
- without a GPU. -->
29
- <helix-aura class="first-light" :speed="0.4" :terminus="0.8" pattern="braid" />
28
+ without a GPU. `pause-control` draws a button in its corner that stops
29
+ the motion and starts it again, since the light moves for longer than
30
+ five seconds. -->
31
+ <helix-aura class="first-light" :speed="0.4" :terminus="0.8" pattern="braid" pause-control />
30
32
  <div class="hero">
31
33
  <helix-tag emphasis="subtle" tone="primary">Starter</helix-tag>
32
34
  <helix-text as="h1" scale="display">Helix design system</helix-text>
@@ -27,7 +27,7 @@ import { DOCS } from './docs.ts'
27
27
 
28
28
  <section class="section">
29
29
  <helix-data-table
30
- columns="minmax(5.5rem, 1.6fr) minmax(4.5rem, 1fr) minmax(4.5rem, 1fr) max-content"
30
+ columns="minmax(5.5rem, 1.6fr) minmax(4.75rem, 1fr) minmax(4.25rem, 1fr) max-content"
31
31
  default-sort="name:asc"
32
32
  label="Roster"
33
33
  :page-size="6"
@@ -7,7 +7,8 @@ import { DOCS } from './docs.ts'
7
7
  /** One message in the toast region, and what it says. */
8
8
  interface Message {
9
9
  readonly id: number
10
- readonly text: string
10
+ /** The answers, one `name=value` pair each, so a line breaks only between pairs. */
11
+ readonly pairs: readonly string[]
11
12
  }
12
13
 
13
14
  const handle = ref('')
@@ -21,8 +22,7 @@ const join = (event: Event) => {
21
22
  event.preventDefault()
22
23
  const answers = [...new FormData(event.currentTarget as HTMLFormElement).entries()]
23
24
  .map(([field, value]) => `${field}=${value}`)
24
- .join(' ')
25
- messages.value = [...messages.value, { id: Date.now(), text: answers }]
25
+ messages.value = [...messages.value, { id: Date.now(), pairs: answers }]
26
26
  }
27
27
 
28
28
  /**
@@ -106,8 +106,8 @@ const dismiss = (id: number) => {
106
106
  <aside class="notes">
107
107
  <!-- The one fact you need before typing your name into a page you have
108
108
  had for five minutes, so it is a callout. `neutral` is a note that
109
- reports no status, drawn in the muted ink with a bar on the inline
110
- start, so it stays in the palette, ink or brand. -->
109
+ reports no status, drawn as a tint of the muted ink with a hairline of
110
+ it around the box, so it stays in the palette, ink or brand. -->
111
111
  <helix-callout tone="neutral">
112
112
  The form posts nothing. Submit it, and a message shows exactly what a server would
113
113
  receive.
@@ -141,7 +141,9 @@ const dismiss = (id: number) => {
141
141
  >
142
142
  <helix-flex direction="column" gap="2xs">
143
143
  <helix-text scale="body-strong">Read by the form</helix-text>
144
- <helix-text scale="code">{{ message.text }}</helix-text>
144
+ <helix-flex column-gap="md" wrap>
145
+ <helix-text v-for="pair in message.pairs" :key="pair" scale="code">{{ pair }}</helix-text>
146
+ </helix-flex>
145
147
  </helix-flex>
146
148
  </helix-toast-item>
147
149
  </helix-toast>
@@ -11,7 +11,7 @@
11
11
  * `:root`, and every token follows it.
12
12
  *
13
13
  * **Color appears in two places, and both are named.** Each tile's icon takes
14
- * `--helix-color-primary` on `--helix-color-primary-subtle`, and a chosen row
14
+ * `--helix-color-brand-mark` on `--helix-color-primary-subtle`, and a chosen row
15
15
  * takes `--helix-color-primary-subtle` through the parts the table publishes.
16
16
  * Everywhere else the page is the foreground on the background, and the
17
17
  * components carry their own color.
@@ -140,10 +140,46 @@ helix-app-header {
140
140
  and faded out behind the words so they keep their contrast: it is at full
141
141
  strength only behind the card, which is below the words in one column and
142
142
  beside them in two. */
143
+ /*
144
+ * **On a light page the light is a pale sheen on the page itself.** By default
145
+ * an aura ramps from the page up to `primary`, which in dark is light on black.
146
+ * In light that ramp runs from white to a dark color, and with no brand it drew
147
+ * a gray smoke behind the card: at 390 the muted stat labels sat on #cccccc at
148
+ * 3.7:1. Turned around, from a tint up to white, it laid a #d1d1d1 slab over
149
+ * the end of the hero that read as a smudge. Now the ground is the page, the
150
+ * strands are `primary-subtle`, and their cores take a third of `primary`, so
151
+ * only the strokes show: at 1440 the darkest is #bebebe, 1.86:1, on a thin
152
+ * line, and the strip beside the card stays white where the slab covered 93%
153
+ * of it. A brand colors the strokes. The second half of each pair is the
154
+ * aura's own default, so dark is unchanged.
155
+ *
156
+ * **Side by side, the light starts at 45% of the panel's width.** From 35%, the
157
+ * dark plume reached the end of the lede's lines, and the lede measured 3.84:1
158
+ * against the brightest pixel behind it at 1440. From 45% it measures 8.9:1, and
159
+ * the light reaches full strength at 75%, behind the card.
160
+ *
161
+ * **In one column, the light is measured up from the bottom edge**, so it
162
+ * starts under the actions however the words above them wrap. From 40% of the
163
+ * panel's height, the bright plume passed behind "Open the form" at 390: in dark
164
+ * its label fell to 5.33:1 against the brightest pixel behind it, and its edge
165
+ * to 1.02:1, gone. The light now fades in from 14rem above the bottom, under the
166
+ * actions, and is at full strength from 7rem, behind the card.
167
+ */
143
168
  .first-light {
169
+ --aura-ground: var(--helix-color-background);
170
+ --aura-glow: light-dark(var(--helix-color-primary-subtle), var(--helix-color-primary));
171
+ --aura-haze: light-dark(
172
+ color-mix(in oklab, var(--helix-color-primary-subtle) 50%, var(--helix-color-background)),
173
+ var(--helix-color-primary-subtle)
174
+ );
175
+ --aura-peak: light-dark(
176
+ color-mix(in oklab, var(--helix-color-primary) 34%, var(--helix-color-primary-subtle)),
177
+ var(--helix-color-foreground)
178
+ );
179
+
144
180
  block-size: auto;
145
181
  inset: 0;
146
- mask-image: linear-gradient(to bottom, transparent 40%, black 80%);
182
+ mask-image: linear-gradient(to top, black 7rem, transparent 14rem);
147
183
  pointer-events: none;
148
184
  position: absolute;
149
185
  z-index: var(--helix-layer-beneath);
@@ -151,10 +187,18 @@ helix-app-header {
151
187
 
152
188
  @media (width >= 60rem) {
153
189
  .first-light {
154
- mask-image: linear-gradient(to right, transparent 35%, black 70%);
190
+ mask-image: linear-gradient(to right, transparent 45%, black 75%);
155
191
  }
156
192
  }
157
193
 
194
+ /* **The pause control lines up with the card's trailing edge**, at the panel's
195
+ inline padding, where the aura's own corner put it 12 pixels from the
196
+ panel's edge. At 390 that left it 12 pixels past the card's edge and 4 under
197
+ the card, and its 44-pixel press box overlapped the card by 2. */
198
+ .first-light::part(pause) {
199
+ inset-inline-end: var(--helix-space-2xl);
200
+ }
201
+
158
202
  /* A heading and the lines around it are one block, with a smaller gap than the
159
203
  one between blocks. Every route opens with one. */
160
204
  .hero {
@@ -164,11 +208,17 @@ helix-app-header {
164
208
  }
165
209
 
166
210
  /* The first screen's heading takes more room around it than a route's, and
167
- its lede a step more size, wrapped to even lines. */
211
+ its lede a step more size. Both wrap to even lines where they wrap. Balance
212
+ cannot split three words evenly, so on a phone the heading takes a smaller
213
+ size, below. */
168
214
  .first-screen .hero {
169
215
  gap: var(--helix-space-md);
170
216
  }
171
217
 
218
+ .first-screen .hero > [as="h1"] {
219
+ text-wrap: balance;
220
+ }
221
+
172
222
  .first-screen .lede {
173
223
  font-size: var(--helix-text-lg);
174
224
  text-wrap: balance;
@@ -224,12 +274,14 @@ helix-app-header {
224
274
  block-size: 100%;
225
275
  }
226
276
 
227
- /* Each tile's icon, on a tint of the brand. */
277
+ /* Each tile's icon, on a tint of the brand. The icon is a graphic, so it takes
278
+ `brand-mark`, the brand as a graphic: a graphic needs 3:1 where text needs
279
+ 4.5:1, so a theme can set it nearer the color you chose than `primary`. */
228
280
  .feature-mark {
229
281
  --icon-size: 1.25rem;
230
282
  background-color: var(--helix-color-primary-subtle);
231
283
  border-radius: var(--helix-radii-md);
232
- color: var(--helix-color-primary);
284
+ color: var(--helix-color-brand-mark);
233
285
  display: inline-flex;
234
286
  inline-size: fit-content;
235
287
  padding: var(--helix-space-xs);
@@ -280,9 +332,17 @@ helix-app-header {
280
332
 
281
333
  /* The callout takes the column, which `start` above would otherwise size to its
282
334
  own words: a notice narrower than the paragraph under it reads as a stray. The
283
- link beside it is meant to be its own width. */
335
+ link beside it is meant to be its own width.
336
+
337
+ **The notes' text size, and a step more room under it.** A callout draws at
338
+ the control size, 13px, which beside the notes' 14px read as a smaller voice
339
+ for the one fact that matters. And at the column's 12px gap the heading sat as
340
+ close to the callout as to its own paragraph, so it belonged to neither; 24px
341
+ above it and 12 below tie it to what it heads. */
284
342
  .notes > helix-callout {
343
+ --callout-font-size: var(--helix-text-md);
285
344
  inline-size: 100%;
345
+ margin-block-end: var(--helix-space-sm);
286
346
  }
287
347
 
288
348
  /*
@@ -310,17 +370,66 @@ helix-app-header {
310
370
  display: flex;
311
371
  flex-wrap: wrap;
312
372
  gap: var(--helix-space-md);
373
+ /* Wide enough on a touch screen for the press areas below to meet without
374
+ overlapping, where the links wrap onto a second row. */
375
+ row-gap: max(var(--helix-space-md), calc(var(--helix-size-target) - 1lh));
376
+ }
377
+
378
+ /*
379
+ * **A link reaches the touch target in a transparent box**, as Helix's own row
380
+ * of destinations does, so nothing drawn moves. On a 390 phone the wordmark and
381
+ * the footer links were 21 pixels tall and "React" 37 wide, against a 44-pixel
382
+ * target. The box grows only on the axis the link is short on, into the bar's
383
+ * padding and the gap between links, and `--helix-size-target` is 44 only on a
384
+ * coarse pointer.
385
+ */
386
+ .wordmark,
387
+ .footer-links a {
388
+ position: relative;
389
+ }
390
+
391
+ .wordmark::after,
392
+ .footer-links a::after {
393
+ content: "";
394
+ inset-block: min(0px, calc((100% - var(--helix-size-target)) / 2));
395
+ inset-inline: min(0px, calc((100% - var(--helix-size-target)) / 2));
396
+ position: absolute;
313
397
  }
314
398
 
315
399
  /*
316
400
  * **Narrow, the gutter gives first.** 24 pixels either side of a 390 window
317
- * spend 48 of 390 on margin, and the table needs 355 of what is left. At `md` it
318
- * has 358 and fits; at `lg` it was 13 pixels short, and the last column sat
319
- * outside the box until you scrolled the table sideways.
401
+ * spend 48 of 390 on margin, and the table needs 355 of what is left. At `lg`
402
+ * it was 13 pixels short, and the last column sat outside the box until you
403
+ * scrolled the table sideways. At `md`, 16, the table has 358 and every row
404
+ * holds one line, 40 under a mouse and 45 on a touch screen, in Chromium and
405
+ * WebKit alike. The header, the page, and the footer keep one edge.
320
406
  */
321
407
  @media (width < 40rem) {
408
+ /* **Room under the card for the pause control**: the control, and a 12-pixel
409
+ gap on each side of it. The panel's 48 put the control 4 pixels under the
410
+ card. */
322
411
  .first-screen {
323
- padding: var(--helix-space-2xl) var(--helix-space-lg);
412
+ padding: var(--helix-space-2xl) var(--helix-space-lg)
413
+ calc(var(--helix-size-control-sm) + var(--helix-space-sm) * 2);
414
+ }
415
+
416
+ .first-light::part(pause) {
417
+ inset-inline-end: var(--helix-space-lg);
418
+ }
419
+
420
+ /* **The heading a step down, so it is one line at 390.** At the display
421
+ size, 42px, "Helix design system" is 370 pixels wide in a 316 pixel
422
+ column, and balance broke it as "Helix design" over a lone "system". At
423
+ `2xl`, 32px, it is 282 pixels wide. Narrower than that, it balances again. */
424
+ .first-screen .hero > [as="h1"] {
425
+ --text-font-size: var(--helix-text-2xl);
426
+ }
427
+
428
+ /* One step less between blocks, as the gutter gives: 64 pixels between the
429
+ first screen and the section under it was more than a phone screen's
430
+ blocks need, so the page reads 48. */
431
+ .stack {
432
+ gap: var(--helix-space-2xl);
324
433
  }
325
434
 
326
435
  .page {
@@ -1,7 +1,18 @@
1
1
  import vue from '@vitejs/plugin-vue'
2
2
  import { defineConfig } from 'vite'
3
3
 
4
+ /* **The browsers that have `light-dark()`**, which every Helix color token is
5
+ written with. Vite's default targets reach back to Safari 16.4, so a
6
+ production build rewrites each `light-dark()` into a fallback that resolves
7
+ on the root element. A Toast then draws in the page's mode, white on a white
8
+ page, and so does a `data-color-mode` panel. The development server does not
9
+ minify CSS, so only a build shows it. Safari 18 and Firefox 128 are the
10
+ first with relative colors, `oklch(from ...)`, which the brand ramp is
11
+ built from. */
12
+ const cssTarget = ['chrome123', 'edge123', 'firefox128', 'safari18', 'ios18']
13
+
4
14
  export default defineConfig({
15
+ build: { cssTarget },
5
16
  plugins: [
6
17
  vue({
7
18
  /* **The one setting Vue needs.** Without it, Vue looks up every Helix tag