Skip to content

Commit 71e50cb

Browse files
authored
Disable code block font ligatures (#1922)
1 parent 1659a45 commit 71e50cb

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.vuepress/styles/index.scss

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
@font-face {
22
font-family: 'Fira Code';
3-
src: url('/fonts/FiraCode-Regular.woff2') format('woff2'), url("woff/FiraCode-Regular.woff") format("woff");
3+
src:
4+
url('/fonts/FiraCode-Regular.woff2') format('woff2'),
5+
url('woff/FiraCode-Regular.woff') format('woff');
46
font-weight: 400;
57
font-style: normal;
68
}
@@ -36,14 +38,17 @@ div[class*='language-'].line-numbers-mode .line-numbers {
3638
*/
3739
:root {
3840
--code-line-height: 1.1;
39-
--font-family-code: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'DejaVu Sans Mono',
40-
'Ubuntu Mono', monospace;
41-
}
42-
41+
--font-family-code: 'Fira Code', Consolas, Monaco, 'Andale Mono',
42+
'DejaVu Sans Mono', 'Ubuntu Mono', monospace;
43+
}
44+
4345
/* override vuepress `:root` --code-font-family variable with higher specificity (`body`) because vuepress puts theirs after this one */
4446
body {
45-
--code-font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'DejaVu Sans Mono',
46-
'Ubuntu Mono', monospace;
47+
--code-font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono',
48+
'DejaVu Sans Mono', 'Ubuntu Mono', monospace;
49+
code {
50+
font-variant-ligatures: none;
51+
}
4752
}
4853

4954
@media screen and (min-width: 720px) and (max-width: 815px) {

0 commit comments

Comments
 (0)