Skip to content

Commit 9a9e8e0

Browse files
authored
Merge pull request #316 from matthew-hre/font-fix
Fix: monospace fonts not rendering properly with custom fonts disabled
2 parents 5e898a2 + 8d66ef8 commit 9a9e8e0

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

src/components/codeblock/CodeBlock.module.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99

1010
.codeBlock code {
1111
padding: 16px;
12-
font-family: inherit;
12+
/* Fix for https://github.com/ghostty-org/website/issues/312
13+
* In the case a user has custom fonts disabled, this ensures
14+
* that the code block is still readable.
15+
*
16+
* Additionally, `inherit` here didn't seem to be working? So we're
17+
* setting the font-family explicitly.
18+
*/
19+
font-family: var(--jetbrains-mono), monospace;
1320
}
1421

1522
.copyButton {
@@ -40,4 +47,3 @@
4047
.copyButtonSuccess {
4148
color: var(--atom-one-green);
4249
}
43-

src/components/text/Text.module.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@
7777
}
7878
}
7979
& > code {
80-
font-family: var(--jetbrains-mono);
80+
/* Fix for https://github.com/ghostty-org/website/issues/312
81+
* In the case a user has custom fonts disabled, this ensures
82+
* that the code block is still readable.
83+
*/
84+
font-family: var(--jetbrains-mono), monospace;
8185
border: 1px solid var(--gray-3);
8286
background: var(--gray-2);
8387
border-radius: 4px;

src/components/vt-sequence/VTSequence.module.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
align-items: flex-start;
88

99
& .unimplemented {
10-
font-family: var(--jetbrains-mono);
10+
/* Fix for https://github.com/ghostty-org/website/issues/312
11+
* In the case a user has custom fonts disabled, this ensures
12+
* that the code block is still readable.
13+
*/
14+
font-family: var(--jetbrains-mono), monospace;
1115
font-size: 14px;
1216
background: var(--atom-one-red);
1317
color: var(--gray-0);
@@ -26,7 +30,7 @@
2630
flex-grow: 1;
2731
width: 100%;
2832
display: flex;
29-
font-family: var(--jetbrains-mono);
33+
font-family: var(--jetbrains-mono), monospace;
3034
list-style: none;
3135

3236
& .vtelem {

0 commit comments

Comments
 (0)