Skip to content

Commit 478e711

Browse files
authored
Merge pull request #12 from flexion/hero-monospace-intro
Add Figtree and Inter web fonts
2 parents 36fbebc + ec75f52 commit 478e711

8 files changed

Lines changed: 25 additions & 9 deletions

File tree

19.7 KB
Binary file not shown.
71.4 KB
Binary file not shown.

src/design/base.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
h1, h2, h3, h4 {
1212
line-height: 1.2;
1313
font-weight: 700;
14-
font-family: var(--font-sans);
14+
font-family: var(--font-display);
1515
margin-block-start: 1.5em;
1616
margin-block-end: 0.5em;
1717
}

src/design/fonts.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@font-face {
2+
font-family: 'Figtree';
3+
font-style: normal;
4+
font-weight: 300 900;
5+
font-display: swap;
6+
src: url('../assets/fonts/figtree.woff2') format('woff2');
7+
}
8+
9+
@font-face {
10+
font-family: 'Inter';
11+
font-style: normal;
12+
font-weight: 100 900;
13+
font-display: swap;
14+
src: url('../assets/fonts/inter.woff2') format('woff2');
15+
}

src/design/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@layer reset, tokens, base, compositions, layout, components, utilities;
22

3+
@import url("./fonts.css") layer(tokens);
34
@import url("./reset.css") layer(reset);
45
@import url("./tokens.css") layer(tokens);
56
@import url("./base.css") layer(base);

src/design/layout.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
gap: var(--space-4);
5353
}
5454
.home-hero h1 {
55-
font-family: var(--font-mono);
5655
font-size: var(--step-4);
5756
max-inline-size: 22ch;
5857
}

src/design/tokens.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@
6969
--shadow-card: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 12px rgb(0 0 0 / 0.06);
7070

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

7576
/* ---------- Measure ---------- */
7677
--measure-prose: 65ch;

src/pages/design-system.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ function TypographySection() {
125125
return (
126126
<section id="typography">
127127
<h2>Typography</h2>
128-
<p>System font stack with a major-third (1.25) fluid type scale. Line height 1.5 for body, 1.15 for headings.</p>
128+
<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>
129129
<div class="l-stack">
130-
<div><span style="font-size: var(--step-4); font-weight: 700; line-height: 1.15;">Step 4 — Page title</span></div>
131-
<div><span style="font-size: var(--step-3); font-weight: 700; line-height: 1.15;">Step 3 — Section heading</span></div>
132-
<div><span style="font-size: var(--step-2); font-weight: 700; line-height: 1.15;">Step 2 — Subsection</span></div>
133-
<div><span style="font-size: var(--step-1); font-weight: 700; line-height: 1.15;">Step 1 — Card title</span></div>
130+
<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>
131+
<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>
132+
<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>
133+
<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>
134134
<div><span style="font-size: var(--step-0);">Step 0 — Body text</span></div>
135135
<div><span style="font-size: var(--step--1);">Step −1 — Small text, labels</span></div>
136136
</div>

0 commit comments

Comments
 (0)