From 4316654a988be343032cd2a3582e79b009fa78be Mon Sep 17 00:00:00 2001 From: saicaca Date: Mon, 22 Jan 2024 11:35:54 +0800 Subject: [PATCH] fix: fix custom code font doesn't work --- src/components/misc/Markdown.astro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/misc/Markdown.astro b/src/components/misc/Markdown.astro index a569330..45519a9 100644 --- a/src/components/misc/Markdown.astro +++ b/src/components/misc/Markdown.astro @@ -1,5 +1,7 @@ --- +import '@fontsource-variable/jetbrains-mono'; import '@fontsource-variable/jetbrains-mono/wght-italic.css'; + interface Props { class: string; } @@ -53,7 +55,7 @@ const className = Astro.props.class; /*&:after*/ /* background: var(--link-active)*/ code - font-family: JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace + font-family: 'JetBrains Mono Variable',ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace background: var(--inline-code-bg) color: var(--inline-code-color) padding: 0.125rem 0.25rem