Skip to content

Commit 5136047

Browse files
authored
Cleanup: Remove ligatures from code elements (#3614)
- Add `font-variant-ligatures: none;` to `code` - Update `$monoFont` to a system default monospace font stack - Removes unused static font assets
1 parent 766b987 commit 5136047

10 files changed

Lines changed: 45 additions & 53 deletions

assets/scss/common/_custom.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
src: url("/fonts/Gellix-Bold.woff2") format("woff2");
1515
}
1616

17-
@font-face {
18-
font-family: "Space Mono";
19-
font-style: normal;
20-
font-weight: 400;
21-
font-display: swap;
22-
src: url("/fonts/space-mono-regular-normal-latin.woff2") format("woff2");
23-
}
24-
2517
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css");
2618

2719
@import "resets";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
$TextFont: "Gellix", "Helvetica Neue", Arial, sans-serif;
22
$titleFont: "Gellix", "Helvetica Neue", Arial, sans-serif;
3-
$monoFont: "Space Mono", monospace;
3+
$monoFont: ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;

assets/scss/components/_typography-enhanced.scss

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ h1 {
4242
font-weight: $font-bold;
4343
line-height: 1.1;
4444
margin-bottom: 1.5rem;
45-
45+
4646
@media (min-width: 768px) {
4747
font-size: $text-5xl;
4848
}
@@ -53,7 +53,7 @@ h2 {
5353
font-weight: $font-semibold;
5454
margin-top: 3rem;
5555
margin-bottom: 1.25rem;
56-
56+
5757
@media (min-width: 768px) {
5858
font-size: $text-4xl;
5959
}
@@ -64,7 +64,7 @@ h3 {
6464
font-weight: $font-semibold;
6565
margin-top: 2.5rem;
6666
margin-bottom: 1rem;
67-
67+
6868
@media (min-width: 768px) {
6969
font-size: $text-3xl;
7070
}
@@ -98,15 +98,15 @@ p {
9898
line-height: $leading-relaxed;
9999
margin-bottom: 1.25rem;
100100
color: var(--body-color);
101-
101+
102102
&.lead {
103103
font-size: $text-lg;
104104
line-height: $leading-relaxed;
105105
font-weight: $font-normal;
106106
color: var(--body-color);
107107
opacity: 0.9;
108108
}
109-
109+
110110
&.small {
111111
font-size: $text-sm;
112112
}
@@ -118,17 +118,17 @@ a {
118118
text-decoration: none;
119119
transition: color 0.2s ease;
120120
position: relative;
121-
121+
122122
&:hover {
123123
color: var(--secondary-2);
124124
text-decoration: underline;
125125
}
126-
126+
127127
&.link-underline {
128128
text-decoration: underline;
129129
text-decoration-thickness: 1px;
130130
text-underline-offset: 2px;
131-
131+
132132
&:hover {
133133
text-decoration-thickness: 2px;
134134
}
@@ -142,15 +142,15 @@ ul, ol {
142142
line-height: $leading-relaxed;
143143
margin-bottom: 1.25rem;
144144
padding-left: 1.5rem;
145-
145+
146146
li {
147147
margin-bottom: 0.5rem;
148-
148+
149149
&:last-child {
150150
margin-bottom: 0;
151151
}
152152
}
153-
153+
154154
ul, ol {
155155
margin-top: 0.5rem;
156156
margin-bottom: 0.5rem;
@@ -168,19 +168,19 @@ blockquote {
168168
border-left: 4px solid var(--primary-1);
169169
padding-left: 1.5rem;
170170
margin: 2rem 0;
171-
171+
172172
p {
173173
margin-bottom: 0;
174174
}
175-
175+
176176
cite {
177177
display: block;
178178
font-size: $text-sm;
179179
font-style: normal;
180180
font-weight: $font-medium;
181181
margin-top: 1rem;
182182
opacity: 0.8;
183-
183+
184184
&:before {
185185
content: "";
186186
}
@@ -193,13 +193,14 @@ code {
193193
font-size: 0.85em;
194194
padding: 0.2em 0.4em;
195195
background-color: var(--code-color);
196+
font-variant-ligatures: none;
196197
}
197198

198199
pre {
199200
font-family: $monoFont;
200201
font-size: $text-sm;
201202
line-height: $leading-normal;
202-
203+
203204
code {
204205
padding: 0;
205206
background-color: transparent;
@@ -217,7 +218,7 @@ table {
217218
text-transform: uppercase;
218219
letter-spacing: 0.05em;
219220
}
220-
221+
221222
td {
222223
font-family: $TextFont;
223224
font-size: $text-base;
@@ -288,14 +289,14 @@ small, .text-sm {
288289
body {
289290
font-size: $text-base;
290291
}
291-
292+
292293
p {
293294
font-size: $text-base;
294295
line-height: $leading-normal;
295296
}
296-
297+
297298
blockquote {
298299
font-size: $text-base;
299300
padding-left: 1rem;
300301
}
301-
}
302+
}

assets/scss/components/_typography-improvements.scss

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
--docs-font-size: 16px;
88
--docs-small-font: 14px;
99
--docs-large-font: 18px;
10-
10+
1111
// Improve line height for documentation
1212
--docs-line-height: 1.7;
1313
--docs-heading-line-height: 1.3;
14-
14+
1515
// Enhanced spacing
1616
--docs-paragraph-margin: 1.35rem;
1717
--docs-list-spacing: 0.45rem;
@@ -33,35 +33,34 @@ body {
3333
margin-bottom: var(--docs-paragraph-margin);
3434
font-size: var(--docs-font-size);
3535
line-height: var(--docs-line-height);
36-
36+
3737
}
38-
38+
3939
// List improvements
4040
ul, ol {
4141
margin-bottom: var(--docs-paragraph-margin);
42-
42+
4343
li {
4444
margin-bottom: var(--docs-list-spacing);
4545
line-height: var(--docs-line-height);
4646
font-size: var(--docs-font-size);
47-
47+
4848
// Nested lists
4949
ul, ol {
5050
margin-top: var(--docs-list-spacing);
5151
margin-bottom: var(--docs-list-spacing);
5252
}
5353
}
5454
}
55-
55+
5656
// Code blocks readability
5757
pre {
5858
font-size: var(--docs-small-font);
5959
line-height: 1.5;
6060
border-radius: 4px;
61-
61+
6262
code {
6363
font-size: inherit;
64-
font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
6564
}
6665
}
6766
}
@@ -73,7 +72,7 @@ h1, h2, h3, h4, h5, h6 {
7372
letter-spacing: -0.02em;
7473
margin-top: 2rem;
7574
margin-bottom: 1rem;
76-
75+
7776
// Better heading hierarchy
7877
+ p {
7978
margin-top: 0.75rem;
@@ -84,7 +83,7 @@ h1 {
8483
font-size: 2rem;
8584
font-weight: 700;
8685
margin-top: 0;
87-
86+
8887
@media (max-width: 768px) {
8988
font-size: 1.875rem;
9089
}
@@ -94,7 +93,7 @@ h2 {
9493
font-size: 1.625rem;
9594
margin-top: 2.5rem;
9695
padding-top: 0.5rem;
97-
96+
9897
@media (max-width: 768px) {
9998
font-size: 1.5rem;
10099
}
@@ -103,15 +102,15 @@ h2 {
103102
h3 {
104103
font-size: 1.5rem;
105104
margin-top: 2rem;
106-
105+
107106
@media (max-width: 768px) {
108107
font-size: 1.25rem;
109108
}
110109
}
111110

112111
h4 {
113112
font-size: 1.25rem;
114-
113+
115114
@media (max-width: 768px) {
116115
font-size: 1.125rem;
117116
}
@@ -121,12 +120,12 @@ h4 {
121120
table {
122121
font-size: var(--docs-small-font);
123122
line-height: 1.6;
124-
123+
125124
th {
126125
font-weight: 600;
127126
padding: 0.75rem 1rem;
128127
}
129-
128+
130129
td {
131130
padding: 0.75rem 1rem;
132131
}
@@ -141,10 +140,10 @@ blockquote {
141140
padding-left: 1.5rem;
142141
margin: 1.5rem 0;
143142
color: var(--muted-text-color);
144-
143+
145144
p {
146145
margin-bottom: 0.75rem;
147-
146+
148147
&:last-child {
149148
margin-bottom: 0;
150149
}
@@ -157,10 +156,10 @@ blockquote {
157156
font-size: var(--docs-font-size);
158157
line-height: var(--docs-line-height);
159158
padding: 1.25rem;
160-
159+
161160
p {
162161
margin-bottom: 0.75rem;
163-
162+
164163
&:last-child {
165164
margin-bottom: 0;
166165
}
@@ -173,11 +172,11 @@ a {
173172
text-decoration-thickness: 1px;
174173
text-underline-offset: 0.15em;
175174
transition: all 0.2s ease;
176-
175+
177176
&:hover {
178177
text-decoration-thickness: 2px;
179178
}
180-
179+
181180
// Exception for navigation links
182181
&.nav-link,
183182
&.btn {
@@ -198,14 +197,14 @@ a {
198197
font-size: 12pt;
199198
line-height: 1.5;
200199
}
201-
200+
202201
h1 { font-size: 20pt; }
203202
h2 { font-size: 18pt; }
204203
h3 { font-size: 16pt; }
205204
h4 { font-size: 14pt; }
206-
205+
207206
p, li {
208207
font-size: 12pt;
209208
line-height: 1.5;
210209
}
211-
}
210+
}
-93.2 KB
Binary file not shown.

static/fonts/bw-fusiona.woff2

-42.6 KB
Binary file not shown.
-22.5 KB
Binary file not shown.
-23.8 KB
Binary file not shown.
-23 KB
Binary file not shown.
-15.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)