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
Binary file added src/design/assets/fonts/figtree.woff2
Binary file not shown.
Binary file added src/design/assets/fonts/inter.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion src/design/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
h1, h2, h3, h4 {
line-height: 1.2;
font-weight: 700;
font-family: var(--font-sans);
font-family: var(--font-display);
margin-block-start: 1.5em;
margin-block-end: 0.5em;
}
Expand Down
15 changes: 15 additions & 0 deletions src/design/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@font-face {
font-family: 'Figtree';
font-style: normal;
font-weight: 300 900;
font-display: swap;
src: url('../assets/fonts/figtree.woff2') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url('../assets/fonts/inter.woff2') format('woff2');
}
1 change: 1 addition & 0 deletions src/design/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@layer reset, tokens, base, compositions, layout, components, utilities;

@import url("./fonts.css") layer(tokens);
@import url("./reset.css") layer(reset);
@import url("./tokens.css") layer(tokens);
@import url("./base.css") layer(base);
Expand Down
1 change: 0 additions & 1 deletion src/design/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
gap: var(--space-4);
}
.home-hero h1 {
font-family: var(--font-mono);
font-size: var(--step-4);
max-inline-size: 22ch;
}
Expand Down
5 changes: 3 additions & 2 deletions src/design/tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@
--shadow-card: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 12px rgb(0 0 0 / 0.06);

/* ---------- Font stacks ---------- */
--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
--font-display: 'Figtree', ui-sans-serif, system-ui, sans-serif;
--font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;

/* ---------- Measure ---------- */
--measure-prose: 65ch;
Expand Down
10 changes: 5 additions & 5 deletions src/pages/design-system.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ function TypographySection() {
return (
<section id="typography">
<h2>Typography</h2>
<p>System font stack with a major-third (1.25) fluid type scale. Line height 1.5 for body, 1.15 for headings.</p>
<p>Figtree for headings, Inter for body text, with a major-third (1.25) fluid type scale. Line height 1.5 for body, 1.15 for headings.</p>
<div class="l-stack">
<div><span style="font-size: var(--step-4); font-weight: 700; line-height: 1.15;">Step 4 — Page title</span></div>
<div><span style="font-size: var(--step-3); font-weight: 700; line-height: 1.15;">Step 3 — Section heading</span></div>
<div><span style="font-size: var(--step-2); font-weight: 700; line-height: 1.15;">Step 2 — Subsection</span></div>
<div><span style="font-size: var(--step-1); font-weight: 700; line-height: 1.15;">Step 1 — Card title</span></div>
<div><span style="font-family: var(--font-display); font-size: var(--step-4); font-weight: 700; line-height: 1.15;">Step 4 — Page title</span></div>
<div><span style="font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; line-height: 1.15;">Step 3 — Section heading</span></div>
<div><span style="font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.15;">Step 2 — Subsection</span></div>
<div><span style="font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; line-height: 1.15;">Step 1 — Card title</span></div>
<div><span style="font-size: var(--step-0);">Step 0 — Body text</span></div>
<div><span style="font-size: var(--step--1);">Step −1 — Small text, labels</span></div>
</div>
Expand Down
Loading