@motion-proto/live-tokens 0.7.1 → 0.9.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.
Files changed (96) hide show
  1. package/.claude/skills/live-tokens-add-component/SKILL.md +488 -0
  2. package/README.md +34 -0
  3. package/dist-plugin/index.cjs +707 -90
  4. package/dist-plugin/index.d.cts +1 -0
  5. package/dist-plugin/index.d.ts +1 -0
  6. package/dist-plugin/index.js +707 -90
  7. package/package.json +6 -2
  8. package/src/app/site.css +1 -1
  9. package/src/editor/component-editor/CollapsibleSectionEditor.svelte +34 -27
  10. package/src/editor/component-editor/DialogEditor.svelte +4 -4
  11. package/src/editor/component-editor/NotificationEditor.svelte +3 -1
  12. package/src/editor/component-editor/SectionDividerEditor.svelte +439 -112
  13. package/src/editor/component-editor/StandardButtonsEditor.svelte +13 -1
  14. package/src/editor/component-editor/editors.d.ts +10 -0
  15. package/src/editor/component-editor/index.ts +16 -1
  16. package/src/editor/component-editor/registry.ts +103 -26
  17. package/src/editor/component-editor/scaffolding/AngleDial.svelte +52 -13
  18. package/src/editor/component-editor/scaffolding/ComponentFileManager.svelte +10 -11
  19. package/src/editor/component-editor/scaffolding/ComponentsTab.svelte +2 -2
  20. package/src/editor/component-editor/scaffolding/LinkedBlock.svelte +0 -1
  21. package/src/editor/component-editor/scaffolding/RadialShapePad.svelte +483 -0
  22. package/src/editor/component-editor/scaffolding/ShadowBackdrop.svelte +15 -2
  23. package/src/editor/component-editor/scaffolding/StateBlock.svelte +103 -15
  24. package/src/editor/component-editor/scaffolding/TokenLayout.svelte +9 -6
  25. package/src/editor/component-editor/scaffolding/TypeEditor.svelte +13 -1
  26. package/src/editor/component-editor/scaffolding/VariantGroup.svelte +239 -25
  27. package/src/editor/component-editor/scaffolding/buildTypeGroupTokens.ts +1 -0
  28. package/src/editor/component-editor/scaffolding/componentSources.ts +3 -3
  29. package/src/editor/component-editor/scaffolding/defaultSections.ts +15 -10
  30. package/src/editor/component-editor/scaffolding/types.ts +11 -0
  31. package/src/editor/core/components/componentConfigKeys.ts +22 -3
  32. package/src/editor/core/components/componentConfigService.ts +2 -2
  33. package/src/editor/core/components/componentPersist.ts +7 -5
  34. package/src/editor/core/manifests/manifestService.ts +58 -3
  35. package/src/editor/core/palettes/familySwap.ts +99 -0
  36. package/src/editor/core/palettes/paletteDerivation.ts +69 -0
  37. package/src/editor/core/palettes/tokenRegistry.ts +4 -1
  38. package/src/editor/core/store/editorStore.ts +206 -12
  39. package/src/editor/core/store/editorTypes.ts +55 -12
  40. package/src/editor/core/store/gradientSource.ts +192 -0
  41. package/src/editor/core/themes/migrations/2026-05-19-collapsiblesection-drop-frame-surface.ts +28 -0
  42. package/src/editor/core/themes/migrations/2026-05-19-sectiondivider-rich-gradient.ts +35 -0
  43. package/src/editor/core/themes/migrations/2026-05-20-sectiondivider-slim-variants.ts +82 -0
  44. package/src/editor/core/themes/migrations/2026-05-21-sectiondivider-spacing-to-padding.ts +24 -0
  45. package/src/editor/core/themes/migrations/2026-05-22-sectiondivider-intrinsics-to-css.ts +81 -0
  46. package/src/editor/core/themes/migrations/index.ts +10 -0
  47. package/src/editor/core/themes/slices/components.ts +27 -4
  48. package/src/editor/core/themes/slices/gradients.ts +88 -13
  49. package/src/editor/core/themes/themeInit.ts +2 -2
  50. package/src/editor/core/themes/themeTypes.ts +56 -1
  51. package/src/editor/index.ts +10 -1
  52. package/src/editor/overlay/ColumnsOverlay.svelte +0 -1
  53. package/src/editor/overlay/LiveEditorOverlay.svelte +1 -4
  54. package/src/editor/pages/ComponentEditorPage.svelte +53 -3
  55. package/src/editor/pages/EditorShell.svelte +53 -3
  56. package/src/editor/styles/ui-editor.css +1 -0
  57. package/src/editor/styles/ui-form-controls.css +19 -20
  58. package/src/editor/ui/BezierCurveEditor.svelte +114 -63
  59. package/src/editor/ui/EditorViewSwitcher.svelte +0 -1
  60. package/src/editor/ui/FileLoadList.svelte +22 -5
  61. package/src/editor/ui/FontStackEditor.svelte +214 -76
  62. package/src/editor/ui/GradientEditor.svelte +435 -215
  63. package/src/editor/ui/GradientStopPicker.svelte +11 -3
  64. package/src/editor/ui/ManifestFileManager.svelte +71 -4
  65. package/src/editor/ui/PaletteEditor.svelte +52 -79
  66. package/src/editor/ui/ProjectFontsSection.svelte +328 -293
  67. package/src/editor/ui/ThemeFileManager.svelte +0 -4
  68. package/src/editor/ui/UIFontFamilySelector.svelte +0 -1
  69. package/src/editor/ui/UIFontSizeSelector.svelte +3 -0
  70. package/src/editor/ui/UIInfoPopover.svelte +0 -1
  71. package/src/editor/ui/UILetterSpacingSelector.svelte +65 -0
  72. package/src/editor/ui/UIPaletteSelector.svelte +31 -4
  73. package/src/editor/ui/UIPillButton.svelte +33 -3
  74. package/src/editor/ui/UISegmentedControl.svelte +114 -0
  75. package/src/editor/ui/UITokenSelector.svelte +4 -1
  76. package/src/editor/ui/VariablesTab.svelte +41 -35
  77. package/src/editor/ui/palette/OverridesPanel.svelte +14 -37
  78. package/src/editor/ui/palette/PaletteBase.svelte +3 -3
  79. package/src/editor/ui/sections/ColumnsSection.svelte +1 -2
  80. package/src/editor/ui/sections/GradientsSection.svelte +1 -1
  81. package/src/editor/ui/sections/OverlaysSection.svelte +1 -1
  82. package/src/editor/ui/sections/ShadowsSection.svelte +1 -1
  83. package/src/system/components/Button.svelte +2 -2
  84. package/src/system/components/Card.svelte +29 -1
  85. package/src/system/components/CollapsibleSection.svelte +25 -2
  86. package/src/system/components/Dialog.svelte +24 -4
  87. package/src/system/components/FloatingTokenTags.css +43 -24
  88. package/src/system/components/FloatingTokenTags.svelte +88 -137
  89. package/src/system/components/Notification.svelte +8 -1
  90. package/src/system/components/SectionDivider.svelte +532 -381
  91. package/src/system/styles/CONVENTIONS.md +1 -1
  92. package/src/system/styles/fonts.css +3 -16
  93. package/src/system/styles/tokens.css +356 -1199
  94. package/src/system/styles/tokens.generated.css +544 -0
  95. package/src/editor/component-editor/scaffolding/DividerEditor.svelte +0 -94
  96. package/src/editor/component-editor/scaffolding/GradientCard.svelte +0 -296
@@ -3,13 +3,26 @@
3
3
 
4
4
  import { onMount, tick } from 'svelte';
5
5
 
6
+ /** Size variant. Each variant owns everything that defines its look:
7
+ * typography, geometry, colors AND the intrinsic display properties
8
+ * (alignment, eyebrow visibility, description visibility, hairline
9
+ * position). Every intrinsic flows through `:root` CSS vars so a designer
10
+ * edit cascades to every consumer instance without per-call wiring. */
11
+ type Variant = 'lg' | 'md' | 'sm';
12
+
6
13
  interface Props {
7
14
  title: string;
8
15
  description?: string | undefined;
9
- variant?: 'canvas' | 'neutral' | 'alternate' | 'primary' | 'accent' | 'special';
16
+ eyebrow?: string | undefined;
17
+ variant?: Variant;
10
18
  }
11
19
 
12
- let { title, description = undefined, variant = 'canvas' }: Props = $props();
20
+ let {
21
+ title,
22
+ description = undefined,
23
+ eyebrow = undefined,
24
+ variant = 'md',
25
+ }: Props = $props();
13
26
 
14
27
  let svgEl: SVGSVGElement | undefined = $state();
15
28
  let svgTextEl: SVGTextElement | undefined = $state();
@@ -18,37 +31,25 @@
18
31
  let svgX = $state(0);
19
32
  let svgY = $state(0);
20
33
 
21
- // feMorphology radius and feFlood flood-color are non-presentation attributes:
22
- // they can't read CSS vars. We read the resolved values off the SVG element
23
- // and push them onto the filter primitives, refreshing whenever the editor
24
- // mutates inline CSS vars on documentElement. Reading the variant-scoped
25
- // internal `--_divider-title-*` vars (set by the .variant-{v} class) keeps
26
- // this independent of the variant prop.
34
+ // feMorphology radius and feFlood flood-color are non-presentation attributes
35
+ // and can't read CSS vars. Read resolved values off the SVG element and push
36
+ // them onto the filter primitives, refreshing on doc-level inline-var changes.
27
37
  let outlineRadius = $state('0');
28
38
  let outlineColor = $state('#000');
29
- // Stable per-instance id so multiple SectionDividers on the same page each
30
- // bind their <text> to their own filter.
31
39
  const filterId = `sd-outline-${Math.random().toString(36).slice(2, 10)}`;
32
40
 
33
41
  function syncFilter(): void {
34
42
  if (!svgEl) return;
35
43
  const cs = getComputedStyle(svgEl);
36
- const wPx = parseFloat(cs.getPropertyValue('--_divider-title-border-width'));
37
- // SVG stroke extends `width/2` on each side; feMorphology radius dilates
38
- // by `radius` outward — so radius = width/2 gives the same visible outline.
44
+ const wPx = parseFloat(cs.getPropertyValue('--_divider-title-outline-width'));
39
45
  outlineRadius = String(Number.isFinite(wPx) ? wPx / 2 : 0);
40
- const c = cs.getPropertyValue('--_divider-title-stroke-color').trim();
46
+ const c = cs.getPropertyValue('--_divider-title-outline-color').trim();
41
47
  outlineColor = c || '#000';
42
48
  }
43
49
 
44
50
  function measure(): void {
45
51
  if (!svgTextEl) return;
46
52
  const bb = svgTextEl.getBBox();
47
- // Size the SVG to the glyph bbox exactly and map that bbox onto the
48
- // canvas via viewBox. Otherwise svgH = bb.y + bb.height carries any
49
- // empty band between y=0 and the glyph top (and any extra at the
50
- // bottom of the bbox), leaving the title vertically unbalanced inside
51
- // the container's symmetric top/bottom padding.
52
53
  svgX = bb.x;
53
54
  svgY = bb.y;
54
55
  svgW = Math.ceil(bb.width);
@@ -64,396 +65,463 @@
64
65
  onMount(() => {
65
66
  measure();
66
67
  syncFilter();
67
- // CSS-var edits (font-size/family/weight) change the rendered bbox but
68
- // never change the `title` prop — so re-measure on every style mutation
69
- // alongside the filter sync.
70
68
  const obs = new MutationObserver(() => { measure(); syncFilter(); });
71
69
  obs.observe(document.documentElement, { attributes: true, attributeFilter: ['style'] });
72
70
  return () => obs.disconnect();
73
71
  });
74
72
  </script>
75
73
 
76
- <div class="section-divider variant-{variant}">
77
- <svg
78
- bind:this={svgEl}
79
- class="divider-label"
80
- width={svgW || undefined}
81
- height={svgH || undefined}
82
- viewBox={svgW && svgH ? `${svgX} ${svgY} ${svgW} ${svgH}` : undefined}
83
- aria-label={title}
84
- role="img"
85
- >
86
- <defs>
87
- <filter id={filterId} x="-50%" y="-50%" width="200%" height="200%">
88
- <feMorphology in="SourceAlpha" operator="dilate" radius={outlineRadius} result="dilated" />
89
- <feFlood flood-color={outlineColor} result="color" />
90
- <feComposite in="color" in2="dilated" operator="in" result="outline" />
91
- <feComposite in="SourceGraphic" in2="outline" operator="over" />
92
- </filter>
93
- </defs>
94
- <text
95
- bind:this={svgTextEl}
96
- x="0"
97
- y="0"
98
- dominant-baseline="hanging"
99
- filter="url(#{filterId})"
100
- >{title}</text>
101
- </svg>
102
- {#if description}
103
- <p class="divider-description">{description}</p>
104
- {/if}
105
- </div>
74
+ <!-- In dev, render every variant-controlled block so the editor can flip
75
+ intrinsics live; CSS hides the unused ones via container style queries.
76
+ In prod, Vite folds `import.meta.env.DEV` to `false` and strips the dev
77
+ branch; the else branch's PRUNE_FOR markers are resolved by the
78
+ `buildPruneReplace` preprocessor (vite-plugin/pruneMarkers/) into static
79
+ `{#if variant === ...}` guards driven by the production component-config. -->
80
+ {#if import.meta.env.DEV}
81
+ <div class="section-divider variant-{variant}">
82
+ <span class="divider-eyebrow">{eyebrow ?? ''}</span>
83
+ <span class="sd-hairline sd-hairline--row sd-hairline-above-label" aria-hidden="true"></span>
84
+ <div class="title-row">
85
+ <span class="sd-hairline sd-hairline--side sd-hairline-through-label" aria-hidden="true"></span>
86
+ <span class="title-inline">
87
+ <svg
88
+ bind:this={svgEl}
89
+ class="divider-label"
90
+ width={svgW || undefined}
91
+ height={svgH || undefined}
92
+ viewBox={svgW && svgH ? `${svgX} ${svgY} ${svgW} ${svgH}` : undefined}
93
+ aria-label={title}
94
+ role="img"
95
+ >
96
+ <defs>
97
+ <filter id={filterId} x="-50%" y="-50%" width="200%" height="200%">
98
+ <feMorphology in="SourceAlpha" operator="dilate" radius={outlineRadius} result="dilated" />
99
+ <feFlood flood-color={outlineColor} result="color" />
100
+ <feComposite in="color" in2="dilated" operator="in" result="outline" />
101
+ <feComposite in="SourceGraphic" in2="outline" operator="over" />
102
+ </filter>
103
+ </defs>
104
+ <text
105
+ bind:this={svgTextEl}
106
+ x="0"
107
+ y="0"
108
+ dominant-baseline="hanging"
109
+ filter="url(#{filterId})"
110
+ >{title}</text>
111
+ </svg>
112
+ </span>
113
+ <span class="sd-hairline sd-hairline--side sd-hairline-through-label" aria-hidden="true"></span>
114
+ </div>
115
+ <span class="sd-hairline sd-hairline--row sd-hairline-below-label" aria-hidden="true"></span>
116
+ <span class="sd-hairline sd-hairline--row sd-hairline-above-description" aria-hidden="true"></span>
117
+ <div class="description-row">
118
+ <span class="sd-hairline sd-hairline--side sd-hairline-through-description" aria-hidden="true"></span>
119
+ <span class="description-inline">
120
+ <p class="divider-description">{description ?? ''}</p>
121
+ </span>
122
+ <span class="sd-hairline sd-hairline--side sd-hairline-through-description" aria-hidden="true"></span>
123
+ </div>
124
+ <span class="sd-hairline sd-hairline--row sd-hairline-below-description" aria-hidden="true"></span>
125
+ </div>
126
+ {:else}
127
+ <div class="section-divider variant-{variant}">
128
+ <!--PRUNE_FOR sectiondivider eyebrow-display != none default=none-->
129
+ <span class="divider-eyebrow">{eyebrow ?? ''}</span>
130
+ <!--END_PRUNE-->
131
+ <!--PRUNE_FOR sectiondivider hairline == above-label default=none-->
132
+ <span class="sd-hairline sd-hairline--row sd-hairline-above-label" aria-hidden="true"></span>
133
+ <!--END_PRUNE-->
134
+ <div class="title-row">
135
+ <!--PRUNE_FOR sectiondivider hairline == through-label default=none-->
136
+ <span class="sd-hairline sd-hairline--side sd-hairline-through-label" aria-hidden="true"></span>
137
+ <!--END_PRUNE-->
138
+ <span class="title-inline">
139
+ <svg
140
+ bind:this={svgEl}
141
+ class="divider-label"
142
+ width={svgW || undefined}
143
+ height={svgH || undefined}
144
+ viewBox={svgW && svgH ? `${svgX} ${svgY} ${svgW} ${svgH}` : undefined}
145
+ aria-label={title}
146
+ role="img"
147
+ >
148
+ <defs>
149
+ <filter id={filterId} x="-50%" y="-50%" width="200%" height="200%">
150
+ <feMorphology in="SourceAlpha" operator="dilate" radius={outlineRadius} result="dilated" />
151
+ <feFlood flood-color={outlineColor} result="color" />
152
+ <feComposite in="color" in2="dilated" operator="in" result="outline" />
153
+ <feComposite in="SourceGraphic" in2="outline" operator="over" />
154
+ </filter>
155
+ </defs>
156
+ <text
157
+ bind:this={svgTextEl}
158
+ x="0"
159
+ y="0"
160
+ dominant-baseline="hanging"
161
+ filter="url(#{filterId})"
162
+ >{title}</text>
163
+ </svg>
164
+ </span>
165
+ <!--PRUNE_FOR sectiondivider hairline == through-label default=none-->
166
+ <span class="sd-hairline sd-hairline--side sd-hairline-through-label" aria-hidden="true"></span>
167
+ <!--END_PRUNE-->
168
+ </div>
169
+ <!--PRUNE_FOR sectiondivider hairline == below-label default=none-->
170
+ <span class="sd-hairline sd-hairline--row sd-hairline-below-label" aria-hidden="true"></span>
171
+ <!--END_PRUNE-->
172
+ <!--PRUNE_FOR sectiondivider hairline == above-description default=none-->
173
+ <span class="sd-hairline sd-hairline--row sd-hairline-above-description" aria-hidden="true"></span>
174
+ <!--END_PRUNE-->
175
+ <!--PRUNE_FOR sectiondivider description-display != none default=flex-->
176
+ <div class="description-row">
177
+ <!--PRUNE_FOR sectiondivider hairline == through-description default=none-->
178
+ <span class="sd-hairline sd-hairline--side sd-hairline-through-description" aria-hidden="true"></span>
179
+ <!--END_PRUNE-->
180
+ <span class="description-inline">
181
+ <p class="divider-description">{description ?? ''}</p>
182
+ </span>
183
+ <!--PRUNE_FOR sectiondivider hairline == through-description default=none-->
184
+ <span class="sd-hairline sd-hairline--side sd-hairline-through-description" aria-hidden="true"></span>
185
+ <!--END_PRUNE-->
186
+ </div>
187
+ <!--END_PRUNE-->
188
+ <!--PRUNE_FOR sectiondivider hairline == below-description default=none-->
189
+ <span class="sd-hairline sd-hairline--row sd-hairline-below-description" aria-hidden="true"></span>
190
+ <!--END_PRUNE-->
191
+ </div>
192
+ {/if}
106
193
 
107
194
  <style>
108
- /* Per-variant slots. Properties the editor links across variants
109
- (typography, padding, outline, radius) ship with identical defaults so
110
- they read as one linked group out of the box; gradient angle, stop
111
- colors, and stop positions are authored per variant and are not linked. */
195
+ /* Each size variant owns its full token set: typography, geometry, colors
196
+ AND intrinsic display properties (alignment, eyebrow/description
197
+ visibility, hairline position, eyebrow text-transform). There is no
198
+ separate color axis variants are full presets the designer composes
199
+ in the editor. The instance picks one variant; that's it. */
112
200
  :global(:root) {
113
- /* Canvas */
114
- --sectiondivider-canvas-padding: var(--space-16);
115
- --sectiondivider-canvas-title: var(--text-primary);
116
- --sectiondivider-canvas-title-font-family: var(--font-display);
117
- --sectiondivider-canvas-title-font-size: var(--font-size-5xl);
118
- --sectiondivider-canvas-title-font-weight: var(--font-weight-normal);
119
- --sectiondivider-canvas-title-line-height: var(--line-height-xs);
120
- --sectiondivider-canvas-title-border-width: var(--border-width-4);
121
- --sectiondivider-canvas-title-stroke-color: var(--surface-canvas-lowest);
122
- /* Title stroke defaults intentionally diverge per variant — the property
123
- is linkable but ships unlinked, with each variant matching its own
124
- surface-lowest so stroke + gradient read as one family. */
125
- --sectiondivider-canvas-description: var(--text-secondary);
126
- --sectiondivider-canvas-description-font-family: var(--font-sans);
127
- --sectiondivider-canvas-description-font-size: var(--font-size-md);
128
- --sectiondivider-canvas-description-font-weight: var(--font-weight-normal);
129
- --sectiondivider-canvas-description-line-height: var(--line-height-md);
130
- --sectiondivider-canvas-gradient-angle: var(--gradient-angle-diagonal);
131
- --sectiondivider-canvas-gradient-stop-1-color: var(--surface-canvas-highest);
132
- --sectiondivider-canvas-gradient-stop-1-position: var(--gradient-stop-start);
133
- --sectiondivider-canvas-gradient-stop-2-color: var(--surface-canvas-higher);
134
- --sectiondivider-canvas-gradient-stop-2-position: var(--gradient-stop-mid);
135
- --sectiondivider-canvas-gradient-stop-3-color: var(--surface-canvas);
136
- --sectiondivider-canvas-gradient-stop-3-position: var(--gradient-stop-end);
137
- --sectiondivider-canvas-radius: var(--radius-lg);
138
- --sectiondivider-canvas-border: var(--color-transparent);
139
- --sectiondivider-canvas-border-width: var(--border-width-0);
140
- --sectiondivider-canvas-shadow: var(--shadow-none);
141
-
142
- /* Neutral */
143
- --sectiondivider-neutral-padding: var(--space-16);
144
- --sectiondivider-neutral-title: var(--text-primary);
145
- --sectiondivider-neutral-title-font-family: var(--font-display);
146
- --sectiondivider-neutral-title-font-size: var(--font-size-5xl);
147
- --sectiondivider-neutral-title-font-weight: var(--font-weight-normal);
148
- --sectiondivider-neutral-title-line-height: var(--line-height-xs);
149
- --sectiondivider-neutral-title-border-width: var(--border-width-4);
150
- --sectiondivider-neutral-title-stroke-color: var(--surface-neutral-lowest);
151
- --sectiondivider-neutral-description: var(--text-secondary);
152
- --sectiondivider-neutral-description-font-family: var(--font-sans);
153
- --sectiondivider-neutral-description-font-size: var(--font-size-md);
154
- --sectiondivider-neutral-description-font-weight: var(--font-weight-normal);
155
- --sectiondivider-neutral-description-line-height: var(--line-height-md);
156
- --sectiondivider-neutral-gradient-angle: var(--gradient-angle-diagonal);
157
- --sectiondivider-neutral-gradient-stop-1-color: var(--surface-neutral-highest);
158
- --sectiondivider-neutral-gradient-stop-1-position: var(--gradient-stop-start);
159
- --sectiondivider-neutral-gradient-stop-2-color: var(--surface-neutral-higher);
160
- --sectiondivider-neutral-gradient-stop-2-position: var(--gradient-stop-mid);
161
- --sectiondivider-neutral-gradient-stop-3-color: var(--surface-neutral);
162
- --sectiondivider-neutral-gradient-stop-3-position: var(--gradient-stop-end);
163
- --sectiondivider-neutral-radius: var(--radius-lg);
164
- --sectiondivider-neutral-border: var(--color-transparent);
165
- --sectiondivider-neutral-border-width: var(--border-width-0);
166
- --sectiondivider-neutral-shadow: var(--shadow-none);
167
-
168
- /* Alternate */
169
- --sectiondivider-alternate-padding: var(--space-16);
170
- --sectiondivider-alternate-title: var(--text-primary);
171
- --sectiondivider-alternate-title-font-family: var(--font-display);
172
- --sectiondivider-alternate-title-font-size: var(--font-size-5xl);
173
- --sectiondivider-alternate-title-font-weight: var(--font-weight-normal);
174
- --sectiondivider-alternate-title-line-height: var(--line-height-xs);
175
- --sectiondivider-alternate-title-border-width: var(--border-width-4);
176
- --sectiondivider-alternate-title-stroke-color: var(--surface-alternate-lowest);
177
- --sectiondivider-alternate-description: var(--text-secondary);
178
- --sectiondivider-alternate-description-font-family: var(--font-sans);
179
- --sectiondivider-alternate-description-font-size: var(--font-size-md);
180
- --sectiondivider-alternate-description-font-weight: var(--font-weight-normal);
181
- --sectiondivider-alternate-description-line-height: var(--line-height-md);
182
- --sectiondivider-alternate-gradient-angle: var(--gradient-angle-diagonal);
183
- --sectiondivider-alternate-gradient-stop-1-color: var(--surface-alternate-highest);
184
- --sectiondivider-alternate-gradient-stop-1-position: var(--gradient-stop-start);
185
- --sectiondivider-alternate-gradient-stop-2-color: var(--surface-alternate-higher);
186
- --sectiondivider-alternate-gradient-stop-2-position: var(--gradient-stop-mid);
187
- --sectiondivider-alternate-gradient-stop-3-color: var(--surface-alternate);
188
- --sectiondivider-alternate-gradient-stop-3-position: var(--gradient-stop-end);
189
- --sectiondivider-alternate-radius: var(--radius-lg);
190
- --sectiondivider-alternate-border: var(--color-transparent);
191
- --sectiondivider-alternate-border-width: var(--border-width-0);
192
- --sectiondivider-alternate-shadow: var(--shadow-none);
201
+ /* Large */
202
+ --sectiondivider-lg-title-font-family: var(--font-display);
203
+ --sectiondivider-lg-title-font-weight: var(--font-weight-normal);
204
+ --sectiondivider-lg-title-font-size: var(--font-size-5xl);
205
+ --sectiondivider-lg-title-line-height: var(--line-height-xs);
206
+ --sectiondivider-lg-title-letter-spacing: var(--letter-spacing-normal);
207
+ --sectiondivider-lg-title-outline-width: var(--border-width-4);
208
+ --sectiondivider-lg-description-font-family: var(--font-sans);
209
+ --sectiondivider-lg-description-font-weight: var(--font-weight-normal);
210
+ --sectiondivider-lg-description-font-size: var(--font-size-lg);
211
+ --sectiondivider-lg-description-line-height: var(--line-height-md);
212
+ --sectiondivider-lg-eyebrow-font-family: var(--font-sans);
213
+ --sectiondivider-lg-eyebrow-font-weight: var(--font-weight-medium);
214
+ --sectiondivider-lg-eyebrow-font-size: var(--font-size-md);
215
+ --sectiondivider-lg-eyebrow-letter-spacing: var(--letter-spacing-wide);
216
+ --sectiondivider-lg-padding: var(--space-16);
217
+ --sectiondivider-lg-title-padding: var(--space-0);
218
+ --sectiondivider-lg-description-padding: var(--space-0);
219
+ --sectiondivider-lg-eyebrow-padding: var(--space-0);
220
+ --sectiondivider-lg-radius: var(--radius-lg);
221
+ --sectiondivider-lg-border-width: var(--border-width-0);
222
+ --sectiondivider-lg-shadow: var(--shadow-none);
223
+ --sectiondivider-lg-hairline-thickness: var(--border-width-1);
224
+ --sectiondivider-lg-background: linear-gradient(135deg, var(--surface-canvas-highest) 0%, var(--surface-canvas-higher) 50%, var(--surface-canvas) 100%);
225
+ --sectiondivider-lg-title: var(--text-primary);
226
+ --sectiondivider-lg-description: var(--text-secondary);
227
+ --sectiondivider-lg-eyebrow: var(--text-tertiary);
228
+ --sectiondivider-lg-border: var(--color-transparent);
229
+ --sectiondivider-lg-title-outline-color: var(--surface-canvas-lowest);
230
+ --sectiondivider-lg-hairline-color: var(--border-canvas-medium);
193
231
 
194
- /* Primary */
195
- --sectiondivider-primary-padding: var(--space-16);
196
- --sectiondivider-primary-title: var(--text-primary);
197
- --sectiondivider-primary-title-font-family: var(--font-display);
198
- --sectiondivider-primary-title-font-size: var(--font-size-5xl);
199
- --sectiondivider-primary-title-font-weight: var(--font-weight-normal);
200
- --sectiondivider-primary-title-line-height: var(--line-height-xs);
201
- --sectiondivider-primary-title-border-width: var(--border-width-4);
202
- --sectiondivider-primary-title-stroke-color: var(--surface-brand-lowest);
203
- --sectiondivider-primary-description: var(--text-secondary);
204
- --sectiondivider-primary-description-font-family: var(--font-sans);
205
- --sectiondivider-primary-description-font-size: var(--font-size-md);
206
- --sectiondivider-primary-description-font-weight: var(--font-weight-normal);
207
- --sectiondivider-primary-description-line-height: var(--line-height-md);
208
- --sectiondivider-primary-gradient-angle: var(--gradient-angle-diagonal);
209
- --sectiondivider-primary-gradient-stop-1-color: var(--surface-brand-highest);
210
- --sectiondivider-primary-gradient-stop-1-position: var(--gradient-stop-start);
211
- --sectiondivider-primary-gradient-stop-2-color: var(--surface-brand-higher);
212
- --sectiondivider-primary-gradient-stop-2-position: var(--gradient-stop-mid);
213
- --sectiondivider-primary-gradient-stop-3-color: var(--surface-brand);
214
- --sectiondivider-primary-gradient-stop-3-position: var(--gradient-stop-end);
215
- --sectiondivider-primary-radius: var(--radius-lg);
216
- --sectiondivider-primary-border: var(--color-transparent);
217
- --sectiondivider-primary-border-width: var(--border-width-0);
218
- --sectiondivider-primary-shadow: var(--shadow-none);
232
+ /* Medium */
233
+ --sectiondivider-md-title-font-family: var(--font-display);
234
+ --sectiondivider-md-title-font-weight: var(--font-weight-normal);
235
+ --sectiondivider-md-title-font-size: var(--font-size-4xl);
236
+ --sectiondivider-md-title-line-height: var(--line-height-xs);
237
+ --sectiondivider-md-title-letter-spacing: var(--letter-spacing-normal);
238
+ --sectiondivider-md-title-outline-width: var(--border-width-3);
239
+ --sectiondivider-md-description-font-family: var(--font-sans);
240
+ --sectiondivider-md-description-font-weight: var(--font-weight-normal);
241
+ --sectiondivider-md-description-font-size: var(--font-size-md);
242
+ --sectiondivider-md-description-line-height: var(--line-height-md);
243
+ --sectiondivider-md-eyebrow-font-family: var(--font-sans);
244
+ --sectiondivider-md-eyebrow-font-weight: var(--font-weight-medium);
245
+ --sectiondivider-md-eyebrow-font-size: var(--font-size-sm);
246
+ --sectiondivider-md-eyebrow-letter-spacing: var(--letter-spacing-wide);
247
+ --sectiondivider-md-padding: var(--space-12);
248
+ --sectiondivider-md-title-padding: var(--space-0);
249
+ --sectiondivider-md-description-padding: var(--space-0);
250
+ --sectiondivider-md-eyebrow-padding: var(--space-0);
251
+ --sectiondivider-md-radius: var(--radius-md);
252
+ --sectiondivider-md-border-width: var(--border-width-0);
253
+ --sectiondivider-md-shadow: var(--shadow-none);
254
+ --sectiondivider-md-hairline-thickness: var(--border-width-1);
255
+ --sectiondivider-md-background: linear-gradient(135deg, var(--surface-canvas-highest) 0%, var(--surface-canvas-higher) 50%, var(--surface-canvas) 100%);
256
+ --sectiondivider-md-title: var(--text-primary);
257
+ --sectiondivider-md-description: var(--text-secondary);
258
+ --sectiondivider-md-eyebrow: var(--text-tertiary);
259
+ --sectiondivider-md-border: var(--color-transparent);
260
+ --sectiondivider-md-title-outline-color: var(--surface-canvas-lowest);
261
+ --sectiondivider-md-hairline-color: var(--border-canvas-medium);
219
262
 
220
- /* Accent */
221
- --sectiondivider-accent-padding: var(--space-16);
222
- --sectiondivider-accent-title: var(--text-primary);
223
- --sectiondivider-accent-title-font-family: var(--font-display);
224
- --sectiondivider-accent-title-font-size: var(--font-size-5xl);
225
- --sectiondivider-accent-title-font-weight: var(--font-weight-normal);
226
- --sectiondivider-accent-title-line-height: var(--line-height-xs);
227
- --sectiondivider-accent-title-border-width: var(--border-width-4);
228
- --sectiondivider-accent-title-stroke-color: var(--surface-accent-lowest);
229
- --sectiondivider-accent-description: var(--text-secondary);
230
- --sectiondivider-accent-description-font-family: var(--font-sans);
231
- --sectiondivider-accent-description-font-size: var(--font-size-md);
232
- --sectiondivider-accent-description-font-weight: var(--font-weight-normal);
233
- --sectiondivider-accent-description-line-height: var(--line-height-md);
234
- --sectiondivider-accent-gradient-angle: var(--gradient-angle-diagonal);
235
- --sectiondivider-accent-gradient-stop-1-color: var(--surface-accent-highest);
236
- --sectiondivider-accent-gradient-stop-1-position: var(--gradient-stop-start);
237
- --sectiondivider-accent-gradient-stop-2-color: var(--surface-accent-higher);
238
- --sectiondivider-accent-gradient-stop-2-position: var(--gradient-stop-mid);
239
- --sectiondivider-accent-gradient-stop-3-color: var(--surface-accent);
240
- --sectiondivider-accent-gradient-stop-3-position: var(--gradient-stop-end);
241
- --sectiondivider-accent-radius: var(--radius-lg);
242
- --sectiondivider-accent-border: var(--color-transparent);
243
- --sectiondivider-accent-border-width: var(--border-width-0);
244
- --sectiondivider-accent-shadow: var(--shadow-none);
263
+ /* Small */
264
+ --sectiondivider-sm-title-font-family: var(--font-display);
265
+ --sectiondivider-sm-title-font-weight: var(--font-weight-normal);
266
+ --sectiondivider-sm-title-font-size: var(--font-size-3xl);
267
+ --sectiondivider-sm-title-line-height: var(--line-height-xs);
268
+ --sectiondivider-sm-title-letter-spacing: var(--letter-spacing-normal);
269
+ --sectiondivider-sm-title-outline-width: var(--border-width-2);
270
+ --sectiondivider-sm-description-font-family: var(--font-sans);
271
+ --sectiondivider-sm-description-font-weight: var(--font-weight-normal);
272
+ --sectiondivider-sm-description-font-size: var(--font-size-sm);
273
+ --sectiondivider-sm-description-line-height: var(--line-height-md);
274
+ --sectiondivider-sm-eyebrow-font-family: var(--font-sans);
275
+ --sectiondivider-sm-eyebrow-font-weight: var(--font-weight-medium);
276
+ --sectiondivider-sm-eyebrow-font-size: var(--font-size-xs);
277
+ --sectiondivider-sm-eyebrow-letter-spacing: var(--letter-spacing-wide);
278
+ --sectiondivider-sm-padding: var(--space-8);
279
+ --sectiondivider-sm-title-padding: var(--space-0);
280
+ --sectiondivider-sm-description-padding: var(--space-0);
281
+ --sectiondivider-sm-eyebrow-padding: var(--space-0);
282
+ --sectiondivider-sm-radius: var(--radius-sm);
283
+ --sectiondivider-sm-border-width: var(--border-width-0);
284
+ --sectiondivider-sm-shadow: var(--shadow-none);
285
+ --sectiondivider-sm-hairline-thickness: var(--border-width-1);
286
+ --sectiondivider-sm-background: linear-gradient(135deg, var(--surface-canvas-highest) 0%, var(--surface-canvas-higher) 50%, var(--surface-canvas) 100%);
287
+ --sectiondivider-sm-title: var(--text-primary);
288
+ --sectiondivider-sm-description: var(--text-secondary);
289
+ --sectiondivider-sm-eyebrow: var(--text-tertiary);
290
+ --sectiondivider-sm-border: var(--color-transparent);
291
+ --sectiondivider-sm-title-outline-color: var(--surface-canvas-lowest);
292
+ --sectiondivider-sm-hairline-color: var(--border-canvas-medium);
245
293
 
246
- /* Special */
247
- --sectiondivider-special-padding: var(--space-16);
248
- --sectiondivider-special-title: var(--text-primary);
249
- --sectiondivider-special-title-font-family: var(--font-display);
250
- --sectiondivider-special-title-font-size: var(--font-size-5xl);
251
- --sectiondivider-special-title-font-weight: var(--font-weight-normal);
252
- --sectiondivider-special-title-line-height: var(--line-height-xs);
253
- --sectiondivider-special-title-border-width: var(--border-width-4);
254
- --sectiondivider-special-title-stroke-color: var(--surface-special-lowest);
255
- --sectiondivider-special-description: var(--text-secondary);
256
- --sectiondivider-special-description-font-family: var(--font-sans);
257
- --sectiondivider-special-description-font-size: var(--font-size-md);
258
- --sectiondivider-special-description-font-weight: var(--font-weight-normal);
259
- --sectiondivider-special-description-line-height: var(--line-height-md);
260
- --sectiondivider-special-gradient-angle: var(--gradient-angle-diagonal);
261
- --sectiondivider-special-gradient-stop-1-color: var(--surface-special-highest);
262
- --sectiondivider-special-gradient-stop-1-position: var(--gradient-stop-start);
263
- --sectiondivider-special-gradient-stop-2-color: var(--surface-special-higher);
264
- --sectiondivider-special-gradient-stop-2-position: var(--gradient-stop-mid);
265
- --sectiondivider-special-gradient-stop-3-color: var(--surface-special);
266
- --sectiondivider-special-gradient-stop-3-position: var(--gradient-stop-end);
267
- --sectiondivider-special-radius: var(--radius-lg);
268
- --sectiondivider-special-border: var(--color-transparent);
269
- --sectiondivider-special-border-width: var(--border-width-0);
270
- --sectiondivider-special-shadow: var(--shadow-none);
294
+ /* Intrinsic defaults. These keys cascade to `:root` via the editor's
295
+ alias bucket; un-edited variants fall back to these. The defaults
296
+ match the legacy "config bucket" semantics: center alignment, hidden
297
+ eyebrow, visible description, hidden hairline, normal-case eyebrow. */
298
+ --sectiondivider-lg-align: center;
299
+ --sectiondivider-md-align: center;
300
+ --sectiondivider-sm-align: center;
301
+ --sectiondivider-lg-eyebrow-display: none;
302
+ --sectiondivider-md-eyebrow-display: none;
303
+ --sectiondivider-sm-eyebrow-display: none;
304
+ --sectiondivider-lg-description-display: flex;
305
+ --sectiondivider-md-description-display: flex;
306
+ --sectiondivider-sm-description-display: flex;
307
+ --sectiondivider-lg-hairline: none;
308
+ --sectiondivider-md-hairline: none;
309
+ --sectiondivider-sm-hairline: none;
310
+ --sectiondivider-lg-eyebrow-text-transform: none;
311
+ --sectiondivider-md-eyebrow-text-transform: none;
312
+ --sectiondivider-sm-eyebrow-text-transform: none;
271
313
  }
272
314
 
273
315
  .section-divider {
316
+ /* `container-name` lets the per-variant intrinsic vars below drive
317
+ style-query rules that reveal exactly one hairline and react to the
318
+ align/description-display values. No `container-type` is set so the
319
+ column layout stays in normal flow — style queries don't require it. */
320
+ container-name: sd;
321
+ position: relative;
274
322
  margin: var(--space-24) 0;
275
- padding: var(--_divider-padding) calc(var(--_divider-padding) * 1.5);
323
+ padding:
324
+ var(--_divider-padding-top)
325
+ var(--_divider-padding-right)
326
+ var(--_divider-padding-bottom)
327
+ var(--_divider-padding-left);
276
328
  border-radius: var(--_divider-radius);
277
329
  border: var(--_divider-border-width) solid var(--_divider-border);
278
330
  box-shadow: var(--_divider-shadow);
279
- background: linear-gradient(
280
- var(--_divider-gradient-angle),
281
- var(--_divider-stop-1-color) var(--_divider-stop-1-position),
282
- var(--_divider-stop-2-color) var(--_divider-stop-2-position),
283
- var(--_divider-stop-3-color) var(--_divider-stop-3-position)
284
- );
331
+ background: var(--_divider-bg);
332
+ display: flex;
333
+ flex-direction: column;
334
+ align-items: var(--_divider-align);
335
+ text-align: var(--_divider-align);
336
+ --_divider-justify: var(--_divider-align);
285
337
  }
286
338
 
287
- /* Each variant class collapses its per-variant slots onto one set of
288
- internal `--_divider-*` vars; the rest of the styles only consume those,
289
- so adding a variant means adding a class and a :root block. */
290
- .variant-canvas {
291
- --_divider-padding: var(--sectiondivider-canvas-padding);
292
- --_divider-radius: var(--sectiondivider-canvas-radius);
293
- --_divider-border: var(--sectiondivider-canvas-border);
294
- --_divider-border-width: var(--sectiondivider-canvas-border-width);
295
- --_divider-shadow: var(--sectiondivider-canvas-shadow);
296
- --_divider-gradient-angle: var(--sectiondivider-canvas-gradient-angle);
297
- --_divider-stop-1-color: var(--sectiondivider-canvas-gradient-stop-1-color);
298
- --_divider-stop-1-position: var(--sectiondivider-canvas-gradient-stop-1-position);
299
- --_divider-stop-2-color: var(--sectiondivider-canvas-gradient-stop-2-color);
300
- --_divider-stop-2-position: var(--sectiondivider-canvas-gradient-stop-2-position);
301
- --_divider-stop-3-color: var(--sectiondivider-canvas-gradient-stop-3-color);
302
- --_divider-stop-3-position: var(--sectiondivider-canvas-gradient-stop-3-position);
303
- --_divider-title: var(--sectiondivider-canvas-title);
304
- --_divider-title-font-family: var(--sectiondivider-canvas-title-font-family);
305
- --_divider-title-font-size: var(--sectiondivider-canvas-title-font-size);
306
- --_divider-title-font-weight: var(--sectiondivider-canvas-title-font-weight);
307
- --_divider-title-line-height: var(--sectiondivider-canvas-title-line-height);
308
- --_divider-title-border-width: var(--sectiondivider-canvas-title-border-width);
309
- --_divider-title-stroke-color: var(--sectiondivider-canvas-title-stroke-color);
310
- --_divider-description: var(--sectiondivider-canvas-description);
311
- --_divider-description-font-family: var(--sectiondivider-canvas-description-font-family);
312
- --_divider-description-font-size: var(--sectiondivider-canvas-description-font-size);
313
- --_divider-description-font-weight: var(--sectiondivider-canvas-description-font-weight);
314
- --_divider-description-line-height: var(--sectiondivider-canvas-description-line-height);
339
+ /* Variant pipes one full token set per variant, including the intrinsics
340
+ that now cascade through CSS vars instead of runtime props. */
341
+ .variant-lg {
342
+ --_divider-title-font-family: var(--sectiondivider-lg-title-font-family);
343
+ --_divider-title-font-weight: var(--sectiondivider-lg-title-font-weight);
344
+ --_divider-title-font-size: var(--sectiondivider-lg-title-font-size);
345
+ --_divider-title-line-height: var(--sectiondivider-lg-title-line-height);
346
+ --_divider-title-letter-spacing: var(--sectiondivider-lg-title-letter-spacing);
347
+ --_divider-title-outline-width: var(--sectiondivider-lg-title-outline-width);
348
+ --_divider-description-font-family: var(--sectiondivider-lg-description-font-family);
349
+ --_divider-description-font-weight: var(--sectiondivider-lg-description-font-weight);
350
+ --_divider-description-font-size: var(--sectiondivider-lg-description-font-size);
351
+ --_divider-description-line-height: var(--sectiondivider-lg-description-line-height);
352
+ --_divider-eyebrow-font-family: var(--sectiondivider-lg-eyebrow-font-family);
353
+ --_divider-eyebrow-font-weight: var(--sectiondivider-lg-eyebrow-font-weight);
354
+ --_divider-eyebrow-font-size: var(--sectiondivider-lg-eyebrow-font-size);
355
+ --_divider-eyebrow-letter-spacing: var(--sectiondivider-lg-eyebrow-letter-spacing);
356
+ --_divider-padding-top: var(--sectiondivider-lg-padding-top, var(--sectiondivider-lg-padding));
357
+ --_divider-padding-right: var(--sectiondivider-lg-padding-right, calc(var(--sectiondivider-lg-padding) * 1.5));
358
+ --_divider-padding-bottom: var(--sectiondivider-lg-padding-bottom, var(--sectiondivider-lg-padding));
359
+ --_divider-padding-left: var(--sectiondivider-lg-padding-left, calc(var(--sectiondivider-lg-padding) * 1.5));
360
+ --_divider-radius: var(--sectiondivider-lg-radius);
361
+ --_divider-border-width: var(--sectiondivider-lg-border-width);
362
+ --_divider-shadow: var(--sectiondivider-lg-shadow);
363
+ --_divider-hairline-thickness: var(--sectiondivider-lg-hairline-thickness);
364
+ --_divider-bg: var(--sectiondivider-lg-background);
365
+ --_divider-title: var(--sectiondivider-lg-title);
366
+ --_divider-description: var(--sectiondivider-lg-description);
367
+ --_divider-eyebrow: var(--sectiondivider-lg-eyebrow);
368
+ --_divider-border: var(--sectiondivider-lg-border);
369
+ --_divider-title-outline-color: var(--sectiondivider-lg-title-outline-color);
370
+ --_divider-hairline-color: var(--sectiondivider-lg-hairline-color);
371
+ --_divider-align: var(--sectiondivider-lg-align);
372
+ --_divider-eyebrow-display: var(--sectiondivider-lg-eyebrow-display);
373
+ --_divider-description-display: var(--sectiondivider-lg-description-display);
374
+ --_divider-hairline: var(--sectiondivider-lg-hairline);
375
+ --_divider-eyebrow-text-transform: var(--sectiondivider-lg-eyebrow-text-transform);
315
376
  }
316
377
 
317
- .variant-neutral {
318
- --_divider-padding: var(--sectiondivider-neutral-padding);
319
- --_divider-radius: var(--sectiondivider-neutral-radius);
320
- --_divider-border: var(--sectiondivider-neutral-border);
321
- --_divider-border-width: var(--sectiondivider-neutral-border-width);
322
- --_divider-shadow: var(--sectiondivider-neutral-shadow);
323
- --_divider-gradient-angle: var(--sectiondivider-neutral-gradient-angle);
324
- --_divider-stop-1-color: var(--sectiondivider-neutral-gradient-stop-1-color);
325
- --_divider-stop-1-position: var(--sectiondivider-neutral-gradient-stop-1-position);
326
- --_divider-stop-2-color: var(--sectiondivider-neutral-gradient-stop-2-color);
327
- --_divider-stop-2-position: var(--sectiondivider-neutral-gradient-stop-2-position);
328
- --_divider-stop-3-color: var(--sectiondivider-neutral-gradient-stop-3-color);
329
- --_divider-stop-3-position: var(--sectiondivider-neutral-gradient-stop-3-position);
330
- --_divider-title: var(--sectiondivider-neutral-title);
331
- --_divider-title-font-family: var(--sectiondivider-neutral-title-font-family);
332
- --_divider-title-font-size: var(--sectiondivider-neutral-title-font-size);
333
- --_divider-title-font-weight: var(--sectiondivider-neutral-title-font-weight);
334
- --_divider-title-line-height: var(--sectiondivider-neutral-title-line-height);
335
- --_divider-title-border-width: var(--sectiondivider-neutral-title-border-width);
336
- --_divider-title-stroke-color: var(--sectiondivider-neutral-title-stroke-color);
337
- --_divider-description: var(--sectiondivider-neutral-description);
338
- --_divider-description-font-family: var(--sectiondivider-neutral-description-font-family);
339
- --_divider-description-font-size: var(--sectiondivider-neutral-description-font-size);
340
- --_divider-description-font-weight: var(--sectiondivider-neutral-description-font-weight);
341
- --_divider-description-line-height: var(--sectiondivider-neutral-description-line-height);
378
+ .variant-md {
379
+ --_divider-title-font-family: var(--sectiondivider-md-title-font-family);
380
+ --_divider-title-font-weight: var(--sectiondivider-md-title-font-weight);
381
+ --_divider-title-font-size: var(--sectiondivider-md-title-font-size);
382
+ --_divider-title-line-height: var(--sectiondivider-md-title-line-height);
383
+ --_divider-title-letter-spacing: var(--sectiondivider-md-title-letter-spacing);
384
+ --_divider-title-outline-width: var(--sectiondivider-md-title-outline-width);
385
+ --_divider-description-font-family: var(--sectiondivider-md-description-font-family);
386
+ --_divider-description-font-weight: var(--sectiondivider-md-description-font-weight);
387
+ --_divider-description-font-size: var(--sectiondivider-md-description-font-size);
388
+ --_divider-description-line-height: var(--sectiondivider-md-description-line-height);
389
+ --_divider-eyebrow-font-family: var(--sectiondivider-md-eyebrow-font-family);
390
+ --_divider-eyebrow-font-weight: var(--sectiondivider-md-eyebrow-font-weight);
391
+ --_divider-eyebrow-font-size: var(--sectiondivider-md-eyebrow-font-size);
392
+ --_divider-eyebrow-letter-spacing: var(--sectiondivider-md-eyebrow-letter-spacing);
393
+ --_divider-padding-top: var(--sectiondivider-md-padding-top, var(--sectiondivider-md-padding));
394
+ --_divider-padding-right: var(--sectiondivider-md-padding-right, calc(var(--sectiondivider-md-padding) * 1.5));
395
+ --_divider-padding-bottom: var(--sectiondivider-md-padding-bottom, var(--sectiondivider-md-padding));
396
+ --_divider-padding-left: var(--sectiondivider-md-padding-left, calc(var(--sectiondivider-md-padding) * 1.5));
397
+ --_divider-radius: var(--sectiondivider-md-radius);
398
+ --_divider-border-width: var(--sectiondivider-md-border-width);
399
+ --_divider-shadow: var(--sectiondivider-md-shadow);
400
+ --_divider-hairline-thickness: var(--sectiondivider-md-hairline-thickness);
401
+ --_divider-bg: var(--sectiondivider-md-background);
402
+ --_divider-title: var(--sectiondivider-md-title);
403
+ --_divider-description: var(--sectiondivider-md-description);
404
+ --_divider-eyebrow: var(--sectiondivider-md-eyebrow);
405
+ --_divider-border: var(--sectiondivider-md-border);
406
+ --_divider-title-outline-color: var(--sectiondivider-md-title-outline-color);
407
+ --_divider-hairline-color: var(--sectiondivider-md-hairline-color);
408
+ --_divider-align: var(--sectiondivider-md-align);
409
+ --_divider-eyebrow-display: var(--sectiondivider-md-eyebrow-display);
410
+ --_divider-description-display: var(--sectiondivider-md-description-display);
411
+ --_divider-hairline: var(--sectiondivider-md-hairline);
412
+ --_divider-eyebrow-text-transform: var(--sectiondivider-md-eyebrow-text-transform);
342
413
  }
343
414
 
344
- .variant-alternate {
345
- --_divider-padding: var(--sectiondivider-alternate-padding);
346
- --_divider-radius: var(--sectiondivider-alternate-radius);
347
- --_divider-border: var(--sectiondivider-alternate-border);
348
- --_divider-border-width: var(--sectiondivider-alternate-border-width);
349
- --_divider-shadow: var(--sectiondivider-alternate-shadow);
350
- --_divider-gradient-angle: var(--sectiondivider-alternate-gradient-angle);
351
- --_divider-stop-1-color: var(--sectiondivider-alternate-gradient-stop-1-color);
352
- --_divider-stop-1-position: var(--sectiondivider-alternate-gradient-stop-1-position);
353
- --_divider-stop-2-color: var(--sectiondivider-alternate-gradient-stop-2-color);
354
- --_divider-stop-2-position: var(--sectiondivider-alternate-gradient-stop-2-position);
355
- --_divider-stop-3-color: var(--sectiondivider-alternate-gradient-stop-3-color);
356
- --_divider-stop-3-position: var(--sectiondivider-alternate-gradient-stop-3-position);
357
- --_divider-title: var(--sectiondivider-alternate-title);
358
- --_divider-title-font-family: var(--sectiondivider-alternate-title-font-family);
359
- --_divider-title-font-size: var(--sectiondivider-alternate-title-font-size);
360
- --_divider-title-font-weight: var(--sectiondivider-alternate-title-font-weight);
361
- --_divider-title-line-height: var(--sectiondivider-alternate-title-line-height);
362
- --_divider-title-border-width: var(--sectiondivider-alternate-title-border-width);
363
- --_divider-title-stroke-color: var(--sectiondivider-alternate-title-stroke-color);
364
- --_divider-description: var(--sectiondivider-alternate-description);
365
- --_divider-description-font-family: var(--sectiondivider-alternate-description-font-family);
366
- --_divider-description-font-size: var(--sectiondivider-alternate-description-font-size);
367
- --_divider-description-font-weight: var(--sectiondivider-alternate-description-font-weight);
368
- --_divider-description-line-height: var(--sectiondivider-alternate-description-line-height);
415
+ .variant-sm {
416
+ --_divider-title-font-family: var(--sectiondivider-sm-title-font-family);
417
+ --_divider-title-font-weight: var(--sectiondivider-sm-title-font-weight);
418
+ --_divider-title-font-size: var(--sectiondivider-sm-title-font-size);
419
+ --_divider-title-line-height: var(--sectiondivider-sm-title-line-height);
420
+ --_divider-title-letter-spacing: var(--sectiondivider-sm-title-letter-spacing);
421
+ --_divider-title-outline-width: var(--sectiondivider-sm-title-outline-width);
422
+ --_divider-description-font-family: var(--sectiondivider-sm-description-font-family);
423
+ --_divider-description-font-weight: var(--sectiondivider-sm-description-font-weight);
424
+ --_divider-description-font-size: var(--sectiondivider-sm-description-font-size);
425
+ --_divider-description-line-height: var(--sectiondivider-sm-description-line-height);
426
+ --_divider-eyebrow-font-family: var(--sectiondivider-sm-eyebrow-font-family);
427
+ --_divider-eyebrow-font-weight: var(--sectiondivider-sm-eyebrow-font-weight);
428
+ --_divider-eyebrow-font-size: var(--sectiondivider-sm-eyebrow-font-size);
429
+ --_divider-eyebrow-letter-spacing: var(--sectiondivider-sm-eyebrow-letter-spacing);
430
+ --_divider-padding-top: var(--sectiondivider-sm-padding-top, var(--sectiondivider-sm-padding));
431
+ --_divider-padding-right: var(--sectiondivider-sm-padding-right, calc(var(--sectiondivider-sm-padding) * 1.5));
432
+ --_divider-padding-bottom: var(--sectiondivider-sm-padding-bottom, var(--sectiondivider-sm-padding));
433
+ --_divider-padding-left: var(--sectiondivider-sm-padding-left, calc(var(--sectiondivider-sm-padding) * 1.5));
434
+ --_divider-radius: var(--sectiondivider-sm-radius);
435
+ --_divider-border-width: var(--sectiondivider-sm-border-width);
436
+ --_divider-shadow: var(--sectiondivider-sm-shadow);
437
+ --_divider-hairline-thickness: var(--sectiondivider-sm-hairline-thickness);
438
+ --_divider-bg: var(--sectiondivider-sm-background);
439
+ --_divider-title: var(--sectiondivider-sm-title);
440
+ --_divider-description: var(--sectiondivider-sm-description);
441
+ --_divider-eyebrow: var(--sectiondivider-sm-eyebrow);
442
+ --_divider-border: var(--sectiondivider-sm-border);
443
+ --_divider-title-outline-color: var(--sectiondivider-sm-title-outline-color);
444
+ --_divider-hairline-color: var(--sectiondivider-sm-hairline-color);
445
+ --_divider-align: var(--sectiondivider-sm-align);
446
+ --_divider-eyebrow-display: var(--sectiondivider-sm-eyebrow-display);
447
+ --_divider-description-display: var(--sectiondivider-sm-description-display);
448
+ --_divider-hairline: var(--sectiondivider-sm-hairline);
449
+ --_divider-eyebrow-text-transform: var(--sectiondivider-sm-eyebrow-text-transform);
369
450
  }
370
451
 
371
- .variant-primary {
372
- --_divider-padding: var(--sectiondivider-primary-padding);
373
- --_divider-radius: var(--sectiondivider-primary-radius);
374
- --_divider-border: var(--sectiondivider-primary-border);
375
- --_divider-border-width: var(--sectiondivider-primary-border-width);
376
- --_divider-shadow: var(--sectiondivider-primary-shadow);
377
- --_divider-gradient-angle: var(--sectiondivider-primary-gradient-angle);
378
- --_divider-stop-1-color: var(--sectiondivider-primary-gradient-stop-1-color);
379
- --_divider-stop-1-position: var(--sectiondivider-primary-gradient-stop-1-position);
380
- --_divider-stop-2-color: var(--sectiondivider-primary-gradient-stop-2-color);
381
- --_divider-stop-2-position: var(--sectiondivider-primary-gradient-stop-2-position);
382
- --_divider-stop-3-color: var(--sectiondivider-primary-gradient-stop-3-color);
383
- --_divider-stop-3-position: var(--sectiondivider-primary-gradient-stop-3-position);
384
- --_divider-title: var(--sectiondivider-primary-title);
385
- --_divider-title-font-family: var(--sectiondivider-primary-title-font-family);
386
- --_divider-title-font-size: var(--sectiondivider-primary-title-font-size);
387
- --_divider-title-font-weight: var(--sectiondivider-primary-title-font-weight);
388
- --_divider-title-line-height: var(--sectiondivider-primary-title-line-height);
389
- --_divider-title-border-width: var(--sectiondivider-primary-title-border-width);
390
- --_divider-title-stroke-color: var(--sectiondivider-primary-title-stroke-color);
391
- --_divider-description: var(--sectiondivider-primary-description);
392
- --_divider-description-font-family: var(--sectiondivider-primary-description-font-family);
393
- --_divider-description-font-size: var(--sectiondivider-primary-description-font-size);
394
- --_divider-description-font-weight: var(--sectiondivider-primary-description-font-weight);
395
- --_divider-description-line-height: var(--sectiondivider-primary-description-line-height);
452
+ /* Per-element padding. Each type element (title / description / eyebrow) owns
453
+ its own padding tokens, replacing the section-level `gap`. The user gets
454
+ explicit per-side control via the editor's padding selector. Falls back
455
+ through: side var → single-value var → 0. Variant-scoped so each preset
456
+ can carry its own per-element rhythm. */
457
+ .variant-lg .title-row {
458
+ padding:
459
+ var(--sectiondivider-lg-title-padding-top, var(--sectiondivider-lg-title-padding, 0))
460
+ var(--sectiondivider-lg-title-padding-right, var(--sectiondivider-lg-title-padding, 0))
461
+ var(--sectiondivider-lg-title-padding-bottom, var(--sectiondivider-lg-title-padding, 0))
462
+ var(--sectiondivider-lg-title-padding-left, var(--sectiondivider-lg-title-padding, 0));
396
463
  }
397
-
398
- .variant-accent {
399
- --_divider-padding: var(--sectiondivider-accent-padding);
400
- --_divider-radius: var(--sectiondivider-accent-radius);
401
- --_divider-border: var(--sectiondivider-accent-border);
402
- --_divider-border-width: var(--sectiondivider-accent-border-width);
403
- --_divider-shadow: var(--sectiondivider-accent-shadow);
404
- --_divider-gradient-angle: var(--sectiondivider-accent-gradient-angle);
405
- --_divider-stop-1-color: var(--sectiondivider-accent-gradient-stop-1-color);
406
- --_divider-stop-1-position: var(--sectiondivider-accent-gradient-stop-1-position);
407
- --_divider-stop-2-color: var(--sectiondivider-accent-gradient-stop-2-color);
408
- --_divider-stop-2-position: var(--sectiondivider-accent-gradient-stop-2-position);
409
- --_divider-stop-3-color: var(--sectiondivider-accent-gradient-stop-3-color);
410
- --_divider-stop-3-position: var(--sectiondivider-accent-gradient-stop-3-position);
411
- --_divider-title: var(--sectiondivider-accent-title);
412
- --_divider-title-font-family: var(--sectiondivider-accent-title-font-family);
413
- --_divider-title-font-size: var(--sectiondivider-accent-title-font-size);
414
- --_divider-title-font-weight: var(--sectiondivider-accent-title-font-weight);
415
- --_divider-title-line-height: var(--sectiondivider-accent-title-line-height);
416
- --_divider-title-border-width: var(--sectiondivider-accent-title-border-width);
417
- --_divider-title-stroke-color: var(--sectiondivider-accent-title-stroke-color);
418
- --_divider-description: var(--sectiondivider-accent-description);
419
- --_divider-description-font-family: var(--sectiondivider-accent-description-font-family);
420
- --_divider-description-font-size: var(--sectiondivider-accent-description-font-size);
421
- --_divider-description-font-weight: var(--sectiondivider-accent-description-font-weight);
422
- --_divider-description-line-height: var(--sectiondivider-accent-description-line-height);
464
+ .variant-lg .description-row {
465
+ padding:
466
+ var(--sectiondivider-lg-description-padding-top, var(--sectiondivider-lg-description-padding, 0))
467
+ var(--sectiondivider-lg-description-padding-right, var(--sectiondivider-lg-description-padding, 0))
468
+ var(--sectiondivider-lg-description-padding-bottom, var(--sectiondivider-lg-description-padding, 0))
469
+ var(--sectiondivider-lg-description-padding-left, var(--sectiondivider-lg-description-padding, 0));
423
470
  }
424
-
425
- .variant-special {
426
- --_divider-padding: var(--sectiondivider-special-padding);
427
- --_divider-radius: var(--sectiondivider-special-radius);
428
- --_divider-border: var(--sectiondivider-special-border);
429
- --_divider-border-width: var(--sectiondivider-special-border-width);
430
- --_divider-shadow: var(--sectiondivider-special-shadow);
431
- --_divider-gradient-angle: var(--sectiondivider-special-gradient-angle);
432
- --_divider-stop-1-color: var(--sectiondivider-special-gradient-stop-1-color);
433
- --_divider-stop-1-position: var(--sectiondivider-special-gradient-stop-1-position);
434
- --_divider-stop-2-color: var(--sectiondivider-special-gradient-stop-2-color);
435
- --_divider-stop-2-position: var(--sectiondivider-special-gradient-stop-2-position);
436
- --_divider-stop-3-color: var(--sectiondivider-special-gradient-stop-3-color);
437
- --_divider-stop-3-position: var(--sectiondivider-special-gradient-stop-3-position);
438
- --_divider-title: var(--sectiondivider-special-title);
439
- --_divider-title-font-family: var(--sectiondivider-special-title-font-family);
440
- --_divider-title-font-size: var(--sectiondivider-special-title-font-size);
441
- --_divider-title-font-weight: var(--sectiondivider-special-title-font-weight);
442
- --_divider-title-line-height: var(--sectiondivider-special-title-line-height);
443
- --_divider-title-border-width: var(--sectiondivider-special-title-border-width);
444
- --_divider-title-stroke-color: var(--sectiondivider-special-title-stroke-color);
445
- --_divider-description: var(--sectiondivider-special-description);
446
- --_divider-description-font-family: var(--sectiondivider-special-description-font-family);
447
- --_divider-description-font-size: var(--sectiondivider-special-description-font-size);
448
- --_divider-description-font-weight: var(--sectiondivider-special-description-font-weight);
449
- --_divider-description-line-height: var(--sectiondivider-special-description-line-height);
471
+ .variant-lg .divider-eyebrow {
472
+ padding:
473
+ var(--sectiondivider-lg-eyebrow-padding-top, var(--sectiondivider-lg-eyebrow-padding, 0))
474
+ var(--sectiondivider-lg-eyebrow-padding-right, var(--sectiondivider-lg-eyebrow-padding, 0))
475
+ var(--sectiondivider-lg-eyebrow-padding-bottom, var(--sectiondivider-lg-eyebrow-padding, 0))
476
+ var(--sectiondivider-lg-eyebrow-padding-left, var(--sectiondivider-lg-eyebrow-padding, 0));
477
+ }
478
+ .variant-md .title-row {
479
+ padding:
480
+ var(--sectiondivider-md-title-padding-top, var(--sectiondivider-md-title-padding, 0))
481
+ var(--sectiondivider-md-title-padding-right, var(--sectiondivider-md-title-padding, 0))
482
+ var(--sectiondivider-md-title-padding-bottom, var(--sectiondivider-md-title-padding, 0))
483
+ var(--sectiondivider-md-title-padding-left, var(--sectiondivider-md-title-padding, 0));
484
+ }
485
+ .variant-md .description-row {
486
+ padding:
487
+ var(--sectiondivider-md-description-padding-top, var(--sectiondivider-md-description-padding, 0))
488
+ var(--sectiondivider-md-description-padding-right, var(--sectiondivider-md-description-padding, 0))
489
+ var(--sectiondivider-md-description-padding-bottom, var(--sectiondivider-md-description-padding, 0))
490
+ var(--sectiondivider-md-description-padding-left, var(--sectiondivider-md-description-padding, 0));
491
+ }
492
+ .variant-md .divider-eyebrow {
493
+ padding:
494
+ var(--sectiondivider-md-eyebrow-padding-top, var(--sectiondivider-md-eyebrow-padding, 0))
495
+ var(--sectiondivider-md-eyebrow-padding-right, var(--sectiondivider-md-eyebrow-padding, 0))
496
+ var(--sectiondivider-md-eyebrow-padding-bottom, var(--sectiondivider-md-eyebrow-padding, 0))
497
+ var(--sectiondivider-md-eyebrow-padding-left, var(--sectiondivider-md-eyebrow-padding, 0));
498
+ }
499
+ .variant-sm .title-row {
500
+ padding:
501
+ var(--sectiondivider-sm-title-padding-top, var(--sectiondivider-sm-title-padding, 0))
502
+ var(--sectiondivider-sm-title-padding-right, var(--sectiondivider-sm-title-padding, 0))
503
+ var(--sectiondivider-sm-title-padding-bottom, var(--sectiondivider-sm-title-padding, 0))
504
+ var(--sectiondivider-sm-title-padding-left, var(--sectiondivider-sm-title-padding, 0));
505
+ }
506
+ .variant-sm .description-row {
507
+ padding:
508
+ var(--sectiondivider-sm-description-padding-top, var(--sectiondivider-sm-description-padding, 0))
509
+ var(--sectiondivider-sm-description-padding-right, var(--sectiondivider-sm-description-padding, 0))
510
+ var(--sectiondivider-sm-description-padding-bottom, var(--sectiondivider-sm-description-padding, 0))
511
+ var(--sectiondivider-sm-description-padding-left, var(--sectiondivider-sm-description-padding, 0));
512
+ }
513
+ .variant-sm .divider-eyebrow {
514
+ padding:
515
+ var(--sectiondivider-sm-eyebrow-padding-top, var(--sectiondivider-sm-eyebrow-padding, 0))
516
+ var(--sectiondivider-sm-eyebrow-padding-right, var(--sectiondivider-sm-eyebrow-padding, 0))
517
+ var(--sectiondivider-sm-eyebrow-padding-bottom, var(--sectiondivider-sm-eyebrow-padding, 0))
518
+ var(--sectiondivider-sm-eyebrow-padding-left, var(--sectiondivider-sm-eyebrow-padding, 0));
450
519
  }
451
520
 
452
521
  /* Title rendered as a single <text> through a feMorphology dilate + flood +
453
522
  composite filter. Dilating the alpha treats all glyphs as one combined
454
523
  shape, so neighbor-glyph overlaps (CQ, AC etc.) merge into a single
455
- outline instead of double-stacking. Filter values are pushed onto
456
- <feMorphology>/<feFlood> from JS — those attrs can't read CSS vars. */
524
+ outline instead of double-stacking. */
457
525
  svg.divider-label {
458
526
  display: block;
459
527
  overflow: visible;
@@ -461,23 +529,106 @@
461
529
  }
462
530
  svg.divider-label text {
463
531
  font-family: var(--_divider-title-font-family);
464
- font-size: var(--_divider-title-font-size);
465
532
  font-weight: var(--_divider-title-font-weight);
533
+ font-size: var(--_divider-title-font-size);
534
+ letter-spacing: var(--_divider-title-letter-spacing);
466
535
  fill: currentColor;
467
536
  }
468
537
 
538
+ .title-row {
539
+ display: flex;
540
+ width: 100%;
541
+ justify-content: var(--_divider-justify);
542
+ align-items: center;
543
+ gap: 0.75em;
544
+ }
545
+ .title-inline {
546
+ display: inline-flex;
547
+ }
548
+
549
+ /* Eyebrow visibility + uppercase flow from per-variant CSS vars. */
550
+ .divider-eyebrow {
551
+ display: var(--_divider-eyebrow-display);
552
+ font-family: var(--_divider-eyebrow-font-family);
553
+ font-weight: var(--_divider-eyebrow-font-weight);
554
+ font-size: var(--_divider-eyebrow-font-size);
555
+ letter-spacing: var(--_divider-eyebrow-letter-spacing);
556
+ color: var(--_divider-eyebrow);
557
+ text-transform: var(--_divider-eyebrow-text-transform);
558
+ }
559
+
560
+ /* Description visibility from the per-variant `description-display` var.
561
+ The row keeps its flex layout when shown; `none` removes it from the
562
+ flow entirely. */
563
+ .description-row {
564
+ display: var(--_divider-description-display);
565
+ width: 100%;
566
+ justify-content: var(--_divider-justify);
567
+ align-items: center;
568
+ gap: 0.75em;
569
+ }
570
+ .description-inline {
571
+ display: inline-flex;
572
+ }
469
573
  .divider-description {
470
- margin: var(--space-4) 0 0;
574
+ margin: 0;
471
575
  font-family: var(--_divider-description-font-family);
472
- font-size: var(--_divider-description-font-size);
473
576
  font-weight: var(--_divider-description-font-weight);
577
+ font-size: var(--_divider-description-font-size);
474
578
  line-height: var(--_divider-description-line-height);
475
579
  color: var(--_divider-description);
580
+ font-style: italic;
581
+ }
582
+
583
+ /* Hairlines: all six render unconditionally; container style queries
584
+ reveal exactly one per the variant's `--_divider-hairline` value. */
585
+ .sd-hairline {
586
+ display: none;
587
+ background: var(--_divider-hairline-color);
588
+ height: var(--_divider-hairline-thickness);
589
+ }
590
+ .sd-hairline--row {
591
+ width: 100%;
592
+ }
593
+ .sd-hairline--side {
594
+ flex: 1;
595
+ min-width: 0;
596
+ }
597
+
598
+ @container sd style(--_divider-hairline: above-label) {
599
+ .sd-hairline-above-label { display: block; }
600
+ }
601
+ @container sd style(--_divider-hairline: through-label) {
602
+ .sd-hairline-through-label { display: block; }
603
+ }
604
+ @container sd style(--_divider-hairline: below-label) {
605
+ .sd-hairline-below-label { display: block; }
606
+ }
607
+ @container sd style(--_divider-hairline: above-description) {
608
+ .sd-hairline-above-description { display: block; }
609
+ }
610
+ @container sd style(--_divider-hairline: through-description) {
611
+ .sd-hairline-through-description { display: block; }
612
+ }
613
+ @container sd style(--_divider-hairline: below-description) {
614
+ .sd-hairline-below-description { display: block; }
615
+ }
616
+
617
+ /* When description is hidden, any description-targeted hairline is hidden
618
+ too — the gap follows the description. No editor-side snap logic needed. */
619
+ @container sd style(--_divider-description-display: none) {
620
+ .sd-hairline-above-description,
621
+ .sd-hairline-through-description,
622
+ .sd-hairline-below-description { display: none; }
476
623
  }
477
624
 
478
- @media (max-width: 600px) {
479
- .section-divider {
480
- padding: var(--space-12) var(--space-16);
625
+ /* In start alignment the text hugs the left edge, so the leading side
626
+ hairline would have zero width — hide it and let the trailing one
627
+ stretch to the right edge. Container style query rather than a class. */
628
+ @container sd style(--_divider-align: start) {
629
+ .title-row .sd-hairline--side:first-child,
630
+ .description-row .sd-hairline--side:first-child {
631
+ display: none;
481
632
  }
482
633
  }
483
634
  </style>