Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions configurator/src/components/Preview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
{ var: 'raised', label: 'Raised' },
];
const spaceSteps = ['2xs', 'xs', 's', 'm', 'l', 'xl', '2xl', '3xl'];
const typeScale = ['2xl', 'xl', 'l', 'm', 's', 'xs'];
</script>

<section class="preview">
Expand Down Expand Up @@ -52,6 +53,27 @@
<p class="pv__muted">Muted caption · secondary hierarchy · auto-contrasting.</p>
</section>

<!-- Display type — the framework's display font sizes -->
<section class="pv__block">
<p class="pv__eyebrow">Display type</p>
<p class="pv__display pv__display--l">Display L</p>
<p class="pv__display pv__display--m">Display M</p>
<p class="pv__display pv__display--s">Display S</p>
</section>

<!-- Type scale -->
<section class="pv__block">
<p class="pv__eyebrow">Type scale</p>
<div class="pv__scale">
{#each typeScale as s (s)}
<div class="pv__scale-row">
<span class="pv__scale-sample" style="font-size: var(--sf-text-{s});">Aa</span>
<code>--sf-text-{s}</code>
</div>
{/each}
</div>
</section>

<!-- Surfaces / elevation -->
<section class="pv__block">
<p class="pv__eyebrow">Surfaces</p>
Expand Down Expand Up @@ -239,6 +261,34 @@
font-size: var(--sf-text-s, 0.85rem);
color: var(--sf-color-text--muted, inherit);
}

/* Display type + type scale */
.pv__display {
margin: 0;
font-family: var(--sf-font-display, var(--sf-font-heading, inherit));
font-weight: var(--sf-font-weight-display, 800);
color: var(--sf-color-heading, inherit);
line-height: 1.05;
overflow-wrap: anywhere;
max-width: 100%;
}
.pv__display--l { font-size: var(--sf-text-display-l, 3rem); line-height: var(--sf-display-l-line-height, 1.05); }
.pv__display--m { font-size: var(--sf-text-display-m, 2.4rem); line-height: var(--sf-display-m-line-height, 1.1); }
.pv__display--s { font-size: var(--sf-text-display-s, 1.9rem); line-height: var(--sf-display-s-line-height, 1.15); }

.pv__scale { display: flex; flex-direction: column; gap: 6px; }
.pv__scale-row { display: flex; align-items: baseline; gap: 10px; }
.pv__scale-sample {
font-family: var(--sf-font-heading, inherit);
color: var(--sf-color-text, inherit);
line-height: 1.1;
min-width: 2.2em;
}
.pv__scale-row code {
font-family: var(--sf-font-mono, monospace);
font-size: 11px;
color: var(--sf-color-text--muted, inherit);
}
.pv__a {
color: var(--sf-color-link, #4f8cff);
}
Expand Down
9 changes: 8 additions & 1 deletion configurator/src/components/WcagPanel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,14 @@
{/each}
</div>

<div class="wcag">
<!--
declStr (all framework tokens + overrides, current theme) is applied to the
VISIBLE panel too — not just the hidden probes — so every `var(--sf-color-*)`
swatch, the checker result, the usage chips and the locked-role swatches
actually render their color. The configurator never loads the framework
stylesheet, so without this the panel showed blank/inherited swatches.
-->
<div class="wcag" style={declStr}>
<header class="wcag__head">
<h2 class="wcag__title">Accessibility</h2>
<p class="wcag__lead">
Expand Down
2 changes: 1 addition & 1 deletion configurator/src/data/api-index.generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"_sync": {
"generatedBy": "configurator/scripts/sync-api.mjs",
"source": "docs/api-index.json",
"frameworkVersion": "0.5.28",
"frameworkVersion": "0.5.29",
"tokensHash": "e3312bd5fde6",
"bundles": [
"essential",
Expand Down
Loading