Skip to content

Commit 59fcd3b

Browse files
authored
Fix code font family declaration (#1910)
VuePress puts our `:root` declaration before their own, meaning the declaration we intended as an override was overridden instead. Use higher specificity (`body`) to make sure it takes precedence. This is a follow-up to #1907
1 parent 9944a41 commit 59fcd3b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.vuepress/styles/index.scss

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ div[class*='language-'].line-numbers-mode .line-numbers {
3838
--code-line-height: 1.1;
3939
--font-family-code: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'DejaVu Sans Mono',
4040
'Ubuntu Mono', monospace;
41+
}
42+
43+
/* override vuepress `:root` --code-font-family variable with higher specificity (`body`) because vuepress puts theirs after this one */
44+
body {
4145
--code-font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'DejaVu Sans Mono',
4246
'Ubuntu Mono', monospace;
4347
}

0 commit comments

Comments
 (0)