Skip to content

Commit d942ec1

Browse files
committed
Tweak typography and use Google Sans
1 parent 8181c6c commit d942ec1

File tree

3 files changed

+37
-53
lines changed

3 files changed

+37
-53
lines changed

docusaurus.config.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,30 @@ export default {
176176
},
177177
],
178178
],
179+
headTags: [
180+
{
181+
tagName: 'link',
182+
attributes: {
183+
rel: 'preconnect',
184+
href: 'https://fonts.googleapis.com',
185+
},
186+
},
187+
{
188+
tagName: 'link',
189+
attributes: {
190+
rel: 'preconnect',
191+
href: 'https://fonts.gstatic.com',
192+
crossOrigin: 'true',
193+
},
194+
},
195+
{
196+
tagName: 'link',
197+
attributes: {
198+
rel: 'stylesheet',
199+
href: 'https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet',
200+
},
201+
},
202+
],
179203
scripts: [
180204
'/js/snack-helpers.js',
181205
'/js/toc-fixes.js',

src/css/custom.css

Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
2-
31
:root {
42
--primary-hue: 256.3;
53
--primary-saturation: 53.2%;
@@ -13,13 +11,12 @@
1311
Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', ui-sans-serif,
1412
system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol,
1513
Noto Color Emoji;
16-
--ifm-heading-font-family: var(--ifm-font-family-base);
17-
14+
--ifm-heading-font-family: 'Google Sans', var(--ifm-font-family-base);
1815
--ifm-font-size-base: 100%;
1916
--ifm-line-height-base: 1.75;
2017
--ifm-code-font-size: 85%;
2118

22-
--ifm-heading-font-weight: 700;
19+
--ifm-heading-font-weight: 600;
2320
--ifm-heading-line-height: 1.25;
2421
--ifm-heading-margin-top: 1.618rem;
2522

@@ -151,81 +148,44 @@
151148

152149
h1 {
153150
font-family: var(--ifm-heading-font-family);
151+
font-weight: var(--ifm-heading-font-weight);
154152
font-size: 2rem;
155-
letter-spacing: -0.022em;
156-
margin-top: 0;
157-
margin-bottom: 0.5rem;
158153
margin-left: -0.05rem;
159-
font-weight: 700;
160-
line-height: 1.15;
161154
}
162155

163156
h2 {
164157
font-family: var(--ifm-heading-font-family);
158+
font-weight: var(--ifm-heading-font-weight);
165159
font-size: 1.5rem;
166-
letter-spacing: -0.018em;
167-
margin-top: 2.25rem;
168-
margin-bottom: 0.5rem;
169160
margin-left: -0.04rem;
170-
font-weight: 700;
171-
line-height: 1.22;
172-
border-bottom: none;
173-
padding-bottom: 0;
174161
}
175162

176163
h3 {
177164
font-family: var(--ifm-heading-font-family);
165+
font-weight: var(--ifm-heading-font-weight);
178166
font-size: 1.25rem;
179-
letter-spacing: -0.014em;
180-
margin-top: 2rem;
181-
margin-bottom: 0.5rem;
182-
font-weight: 700;
183-
line-height: 1.3;
184167
}
185168

186169
h4 {
187170
font-family: var(--ifm-heading-font-family);
171+
font-weight: var(--ifm-heading-font-weight);
188172
font-size: 1.125rem;
189-
letter-spacing: -0.012em;
190-
margin-top: 1.75rem;
191-
margin-bottom: 0.5rem;
192-
font-weight: 700;
193-
line-height: 1.35;
194173
}
195174

196175
h5 {
197176
font-family: var(--ifm-heading-font-family);
177+
font-weight: var(--ifm-heading-font-weight);
198178
font-size: 1.0625rem;
199-
letter-spacing: -0.01em;
200-
margin-top: 1.5rem;
201-
margin-bottom: 0.5rem;
202-
font-weight: 700;
203-
line-height: 1.4;
204179
}
205180

206181
h6 {
207182
font-family: var(--ifm-heading-font-family);
183+
font-weight: var(--ifm-heading-font-weight);
208184
font-size: 1rem;
209-
letter-spacing: -0.008em;
210-
margin-top: 1.25rem;
211-
margin-bottom: 0.5rem;
212-
font-weight: 700;
213-
line-height: 1.45;
214-
}
215-
216-
p {
217-
font-size: 1rem;
218-
line-height: 1.75;
219-
margin-bottom: 1.5rem;
220-
letter-spacing: -0.003em;
221185
}
222186

223-
article p {
224-
font-size: 1rem;
225-
line-height: 1.75;
226-
color: var(--ifm-font-color-base);
227-
margin-bottom: 1.5rem;
228-
letter-spacing: -0.003em;
187+
header {
188+
font-family: var(--ifm-heading-font-family);
229189
}
230190

231191
.blog-wrapper .container {
@@ -435,6 +395,7 @@ article p {
435395
}
436396

437397
.menu__list-item-collapsible > .menu__link {
398+
font-size: 1rem;
438399
font-weight: var(--ifm-font-weight-bold);
439400
color: var(--ifm-color-emphasis-1000);
440401
}
@@ -743,7 +704,6 @@ code {
743704
.blog-wrapper article h2 {
744705
font-size: 2rem;
745706
line-height: 1.3;
746-
letter-spacing: -0.02em;
747707
}
748708

749709
.blog-wrapper article h2 a {

src/pages/home/Splash/styles.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
.mainText {
5656
font-size: 4.375rem;
5757
color: var(--ifm-home-color-text);
58-
font-weight: 900;
59-
margin-bottom: 0;
58+
font-weight: 700;
59+
margin-bottom: 0.25rem;
6060
}
6161

6262
.subText {

0 commit comments

Comments
 (0)