diff --git a/configurator/src/lib/preview/sections.ts b/configurator/src/lib/preview/sections.ts index b3303278..273aa5bd 100644 --- a/configurator/src/lib/preview/sections.ts +++ b/configurator/src/lib/preview/sections.ts @@ -3,7 +3,7 @@ // configurable token/class is visible and reacts live to the configurator. // Foundations enumerate the real API via ./catalog; components are curated. -import { page, section, specimen, tag, cluster, grid, stack, well, esc } from "./specimen"; +import { page, section, specimen, tag, cluster, grid, stack, well, frame, esc } from "./specimen"; import { familySteps, classesOfKind, tokensMatching, tokensByGroup, classesByKind } from "./catalog"; const RAMP_STEPS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]; @@ -331,8 +331,13 @@ const BTN_SIZES: [string, string][] = [["xs", "XS"], ["s", "S"], ["", "M"], ["l" export function components(): string { const btn = (mods: string, label: string) => ``; + // Button rows use frame() (a non-card backdrop), NOT well(): the framework's + // `.sf-card .sf-btn` rule pins a nested button's label to --sf-text-s, which + // would flatten the per-rung font ladder in the Size-scale demo (padding and + // min-height still grow, but the label wouldn't). Cards below keep .sf-card. + // Families — every shipped colour family as a fill button. - const families = well(cluster( + const families = frame(cluster( ...BTN_FAMILIES.map((f) => btn(`sf-btn--${f}`, f[0].toUpperCase() + f.slice(1))), )); @@ -343,11 +348,11 @@ export function components(): string { btn(`sf-btn--${family} sf-btn--outline`, "Outline"), ...(withGradient ? [btn(`sf-btn--${family} sf-btn--gradient`, "Gradient")] : []), ); - const styles = well(stack("s", styleRow("primary", true), styleRow("neutral", false))); + const styles = frame(stack("s", styleRow("primary", true), styleRow("neutral", false))); // Size scale — the hero. Aligned to a common baseline so the per-rung // font-size / padding / min-height ladder reads as a clear staircase. - const sizes = well( + const sizes = frame( `
${BTN_SIZES.map( ([s, label]) => btn(`sf-btn--primary${s ? ` sf-btn--${s}` : ""}`, label), ).join("")}
`, @@ -358,7 +363,7 @@ export function components(): string { // (dashed) where it actually fills its width. // align-items:flex-start so buttons size to content — only --block (explicit // 100%) and the block-cq inside the 16rem query container actually stretch. - const widths = well(`
+ const widths = frame(`
@@ -368,7 +373,7 @@ export function components(): string {
`); // States — default, disabled, loading. - const states = well(cluster( + const states = frame(cluster( btn("sf-btn--primary", "Default"), ``, ``, diff --git a/configurator/src/lib/preview/specimen.ts b/configurator/src/lib/preview/specimen.ts index e3989a0d..a7aedf8d 100644 --- a/configurator/src/lib/preview/specimen.ts +++ b/configurator/src/lib/preview/specimen.ts @@ -63,3 +63,11 @@ export function grid(min: number, ...items: string[]): string { export function well(content: string): string { return `
${content}
`; } + +/** A plain bordered surface backdrop — like `well`, but NOT a `.sf-card`. + * Use for rows of `.sf-btn`: the framework's `.sf-card .sf-btn` rule pins a + * nested button's label to `--sf-text-s`, which would flatten a per-size + * button font ladder; a non-card frame lets each button render its true size. */ +export function frame(content: string): string { + return `
${content}
`; +} diff --git a/demos/full-api-demo-with-overrides.html b/demos/full-api-demo-with-overrides.html index 74d1bb83..91840f70 100644 --- a/demos/full-api-demo-with-overrides.html +++ b/demos/full-api-demo-with-overrides.html @@ -122,7 +122,7 @@

SLASHED Full API Demo

-

v0.7.14 · full bundle from jsDelivr CDN · 328 classes · 756 tokens (265 configurable)

+

v0.7.15 · full bundle from jsDelivr CDN · 328 classes · 756 tokens (265 configurable)

ultimate-override.css is ACTIVE. Every value below is recomputed from perturbed knob tokens — toggle it off in the toolbar, or compare against the un-overridden page.
diff --git a/demos/full-api-demo.html b/demos/full-api-demo.html index ff2e4e88..cb2fbb77 100644 --- a/demos/full-api-demo.html +++ b/demos/full-api-demo.html @@ -121,7 +121,7 @@

SLASHED Full API Demo

-

v0.7.14 · full bundle from jsDelivr CDN · 328 classes · 756 tokens (265 configurable)

+

v0.7.15 · full bundle from jsDelivr CDN · 328 classes · 756 tokens (265 configurable)

Baseline render with default tokens. Use the toolbar to switch theme, toggle the ultimate override live, or replay motion. The always-on override variant is full-api-demo-with-overrides.html.
diff --git a/demos/ultimate-override.css b/demos/ultimate-override.css index 19f831b7..b2cc2d2d 100644 --- a/demos/ultimate-override.css +++ b/demos/ultimate-override.css @@ -1,6 +1,6 @@ /* ============================================================================ ULTIMATE OVERRIDE — generated by demos/generate.mjs (do not edit by hand) - SLASHED v0.7.14 + SLASHED v0.7.15 Perturbs every CONFIGURABLE (role: "knob") token to a valid, visibly-distinct value so full-api-demo.html can prove each one is wired end to end.