Skip to content

Commit 4d466b9

Browse files
committed
Fix glyph variants for JetBrains Mono (stylistic sets)
The issue was that `font-feature-settings` was set globally for the whole `html` tag in `base.css`. Fixed by creating a `--font-mono-settings` variable and setting it to `normal !important`.
1 parent 37d6849 commit 4d466b9

11 files changed

Lines changed: 11 additions & 4 deletions

src/components/Button.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
padding: 5px 18px 6px 18px;
66
font-size: var(--text-small);
77
font-family: var(--font-mono);
8+
font-feature-settings: var(--font-mono-settings);
89
outline: none;
910
border: none;
1011
cursor: pointer;

src/components/SidebarTreeList.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
font-size: var(--text-small);
88
line-height: 1.6rem;
99
font-family: var(--font-mono);
10+
font-feature-settings: var(--font-mono-settings);
1011
font-variant-ligatures: none;
1112
text-decoration: none;
1213
color: var(--black);

src/components/reference/ContentList.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
font-weight: normal;
3434
font-style: normal;
3535
font-family: var(--font-mono);
36+
font-feature-settings: var(--font-mono-settings);
3637
font-size: 85%;
3738
background-color: var(--lightgray);
3839
padding: 0.1em 0.3em;

src/components/reference/ReferenceList.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
.itemName {
4949
flex-basis: calc(100% / 5.5 * 1.5);
5050
font-family: var(--font-mono);
51+
font-feature-settings: var(--font-mono-settings);
5152
font-size: var(--text-regular);
5253
font-variant-ligatures: none;
5354
text-decoration: none;
@@ -66,6 +67,7 @@
6667
font-weight: normal;
6768
font-style: normal;
6869
font-family: var(--font-mono);
70+
font-feature-settings: var(--font-mono-settings);
6971
font-size: 85%;
7072
background-color: var(--lightgray);
7173
padding: 0.1em 0.3em;

src/components/reference/Section.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
font-weight: normal;
3939
font-style: normal;
4040
font-family: var(--font-mono);
41+
font-feature-settings: var(--font-mono-settings);
4142
font-size: 85%;
4243
background-color: var(--lightgray);
4344
padding: 0.1em 0.3em;

src/components/sketch/SketchCode.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
border: 1px solid var(--gray);
1919
border-left: none;
2020
font-family: var(--font-mono);
21+
font-feature-settings: var(--font-mono-settings);
2122
font-size: 14px;
2223
white-space: pre;
2324
user-select: none;

src/styles/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ p {
9191
code,
9292
pre {
9393
font-family: var(--font-mono);
94+
font-feature-settings: var(--font-mono-settings);
9495
font-size: var(--text-small);
9596
font-variant-ligatures: none;
9697
}

src/styles/fonts.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
font-weight: 400;
7171
font-weight: normal;
7272
font-style: normal;
73-
font-variant-ligatures: none;
7473
src: url("./fonts/JetBrains Mono/webfonts/JetBrainsMono-Regular.woff2") format("woff2"),
7574
url("./fonts/JetBrains Mono/ttf/JetBrainsMonoNL-Regular.ttf") format("ttf");
7675
}
@@ -80,7 +79,6 @@
8079
font-weight: 400;
8180
font-weight: normal;
8281
font-style: italic;
83-
font-variant-ligatures: none;
8482
src: url("./fonts/JetBrains Mono/webfonts/JetBrainsMono-Italic.woff2") format("woff2"),
8583
url("./fonts/JetBrains Mono/ttf/JetBrainsMonoNL-Italic.ttf") format("ttf");
8684
}
@@ -90,7 +88,6 @@
9088
font-weight: 700;
9189
font-weight: bold;
9290
font-style: normal;
93-
font-variant-ligatures: none;
9491
src: url("./fonts/JetBrains Mono/webfonts/JetBrainsMono-Bold.woff2") format("woff2"),
9592
url("./fonts/JetBrains Mono/ttf/JetBrainsMonoNL-Bold.ttf") format("ttf");
9693
}
@@ -100,7 +97,6 @@
10097
font-weight: 700;
10198
font-weight: bold;
10299
font-style: italic;
103-
font-variant-ligatures: none;
104100
src: url("./fonts/JetBrains Mono/webfonts/JetBrainsMono-BoldItalic.woff2") format("woff2"),
105101
url("./fonts/JetBrains Mono/ttf/JetBrainsMonoNL-BoldItalic.ttf") format("ttf");
106102
}

src/styles/pages/about.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757

5858
& > pre {
5959
font-family: var(--font-mono);
60+
font-feature-settings: var(--font-mono-settings);
6061
font-size: var(--text-regular);
6162
font-style: normal;
6263
}

src/styles/pages/page.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696

9797
& pre {
9898
font-family: var(--font-mono);
99+
font-feature-settings: var(--font-mono-settings);
99100
font-size: var(--text-regular);
100101
font-style: normal;
101102
}

0 commit comments

Comments
 (0)