Skip to content

Commit 0eb26ff

Browse files
committed
style: Improve typography with scale, spacing, and mobile optimizations
1 parent 279e7e1 commit 0eb26ff

File tree

2 files changed

+107
-12
lines changed

2 files changed

+107
-12
lines changed

aider/website/assets/home.css

Lines changed: 102 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,27 @@
1818
--body-line-height: 1.7;
1919
--paragraph-spacing: 1.6rem;
2020
--heading-spacing: 1.8rem;
21+
22+
/* Typographic scale */
23+
--text-xs: 0.75rem; /* 12px */
24+
--text-sm: 0.875rem; /* 14px */
25+
--text-base: 1rem; /* 16px */
26+
--text-md: 1.125rem; /* 18px */
27+
--text-lg: 1.25rem; /* 20px */
28+
--text-xl: 1.5rem; /* 24px */
29+
--text-2xl: 1.875rem; /* 30px */
30+
--text-3xl: 2.25rem; /* 36px */
31+
--text-4xl: 3rem; /* 48px */
32+
33+
/* Spacing rhythm values */
34+
--space-1: 0.25rem;
35+
--space-2: 0.5rem;
36+
--space-3: 0.75rem;
37+
--space-4: 1rem;
38+
--space-6: 1.5rem;
39+
--space-8: 2rem;
40+
--space-12: 3rem;
41+
--space-16: 4rem;
2142
}
2243

2344
* {
@@ -26,6 +47,31 @@
2647
box-sizing: border-box;
2748
}
2849

50+
html {
51+
scroll-behavior: smooth;
52+
}
53+
54+
h1, h2, h3, h4, h5, h6 {
55+
letter-spacing: -0.025em;
56+
font-weight: 700;
57+
}
58+
59+
h1 {
60+
font-size: var(--text-4xl);
61+
line-height: 1.1;
62+
font-weight: 800;
63+
}
64+
65+
h2 {
66+
font-size: var(--text-2xl);
67+
line-height: 1.2;
68+
}
69+
70+
h3 {
71+
font-size: var(--text-xl);
72+
line-height: 1.3;
73+
}
74+
2975
body {
3076
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
3177
font-size: 16px;
@@ -61,7 +107,7 @@ nav {
61107

62108
.logo {
63109
font-size: 1.8rem;
64-
font-weight: 700;
110+
font-weight: 600;
65111
font-family: 'GlassTTYVT220', monospace;
66112
color: var(--terminal-green);
67113
text-decoration: none;
@@ -78,6 +124,9 @@ nav {
78124
text-decoration: none;
79125
font-weight: 500;
80126
transition: color 0.3s;
127+
font-size: var(--text-sm);
128+
letter-spacing: 0.01em;
129+
text-transform: uppercase;
81130
}
82131

83132
.nav-links a:hover {
@@ -252,7 +301,7 @@ nav {
252301
border-radius: 8px;
253302
padding: 30px;
254303
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
255-
transition: transform 0.3s, box-shadow 0.3s;
304+
transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
256305
border-left: 3px solid var(--primary);
257306
display: block;
258307
color: inherit;
@@ -262,7 +311,14 @@ nav {
262311

263312
.feature-card:hover {
264313
transform: translateY(-5px);
265-
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
314+
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
315+
background-color: rgba(76, 110, 245, 0.03);
316+
}
317+
318+
.feature-card p {
319+
font-size: var(--text-base);
320+
line-height: 1.6;
321+
color: rgba(33, 37, 41, 0.9);
266322
}
267323

268324
.feature-card-header {
@@ -284,14 +340,14 @@ nav {
284340
}
285341

286342
.feature-title {
287-
font-size: 1.35rem;
343+
font-size: var(--text-lg);
288344
color: var(--dark);
289345
margin: 0;
290346
position: relative;
291-
padding-bottom: 12px;
347+
padding-bottom: var(--space-3);
292348
font-weight: 600;
293-
letter-spacing: -0.25px;
294-
line-height: var(--heading-line-height);
349+
letter-spacing: -0.01em;
350+
line-height: 1.3;
295351
}
296352

297353
.feature-title::after {
@@ -309,17 +365,24 @@ nav {
309365
background-color: #f8f9fb;
310366
}
311367

368+
code, pre, .code-block {
369+
font-family: 'Fira Code', 'JetBrains Mono', 'SF Mono', Consolas, Monaco, 'Andale Mono', monospace;
370+
font-feature-settings: "liga" 1, "calt" 1; /* Enable ligatures */
371+
letter-spacing: -0.025em;
372+
font-size: 0.95em;
373+
}
374+
312375
.code-block {
313376
background-color: var(--code-bg);
314377
border-radius: 8px;
315378
padding: 1.5rem;
316379
color: white;
317-
font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, 'Liberation Mono', Menlo, monospace;
318380
font-size: 1.1rem;
319-
line-height: 1.6;
381+
line-height: 1.5;
320382
margin: 1.5rem 0;
321383
overflow-x: auto;
322384
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
385+
tab-size: 2;
323386
}
324387

325388
.testimonials {
@@ -353,6 +416,8 @@ nav {
353416
padding: 0 10px;
354417
font-size: 1.1rem;
355418
line-height: var(--body-line-height);
419+
text-wrap: balance;
420+
hanging-punctuation: first;
356421
}
357422

358423
.testimonial-text::before,
@@ -546,12 +611,15 @@ footer {
546611
height: 28px;
547612
border-radius: 4px;
548613
overflow: hidden;
549-
font-size: 0.85rem;
614+
font-size: var(--text-xs);
550615
font-weight: 600;
551616
line-height: 1;
552617
text-decoration: none;
553618
transition: transform 0.2s;
554619
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
620+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
621+
letter-spacing: 0.02em;
622+
text-transform: uppercase;
555623
}
556624

557625
.github-badge:hover {
@@ -740,6 +808,30 @@ footer {
740808
}
741809
}
742810

811+
@media (max-width: 768px) {
812+
:root {
813+
/* Adjust scale for mobile */
814+
--text-4xl: 2.5rem;
815+
--text-2xl: 1.75rem;
816+
--text-xl: 1.25rem;
817+
}
818+
819+
body {
820+
line-height: 1.5;
821+
}
822+
823+
.feature-card p {
824+
font-size: 0.9375rem;
825+
}
826+
827+
/* Optimize testimonial display on mobile */
828+
.testimonial-text {
829+
font-size: 1rem;
830+
line-height: 1.6;
831+
text-wrap: pretty; /* Modern browsers will balance text */
832+
}
833+
}
834+
743835
@media (max-width: 576px) {
744836
:root {
745837
--heading-line-height: 1.3;

aider/website/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
<meta charset="UTF-8">
88
<meta name="viewport" content="width=device-width, initial-scale=1.0">
99
<title>Aider - AI Pair Programming in Your Terminal</title>
10-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap">
11-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap">
10+
<link rel="preconnect" href="https://fonts.googleapis.com">
11+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12+
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
13+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap&text=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,/()%25&display=fallback">
14+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap&display=fallback">
1215
<link rel="stylesheet" href="/assets/home.css">
1316
<!-- Add Prism.js CSS -->
1417
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css">

0 commit comments

Comments
 (0)