As the title.
I’ve changed a theme’s font successfully by changing the .css file, but I can’t change the code block’s font, it seems relate to syntax highlight and I do not know how to change the highlight font, does anybody know how to solve this problem?
1 Like
This snippet was shared in the discord by @MartinKeigher
/*****************************/
/* Code-blocks: Font & style */
/*****************************/
.theme-dark {
--background-primary-alt: #40444d;
}
/* Edit mode */
.cm-s-obsidian pre.HyperMD-codeblock {
font-family: Cascadia Code;
font-size: 13px;
font-weight: 350;
}
/* Preview mode */
.markdown-preview-view code {
font-family: Cascadia Code;
font-size: 13px;
font-weight: 375;
}
1 Like
santi
May 20, 2021, 5:47pm
3
Thanks @DEV_Scribbles for the awesome tip!
Sorry to be OCD edit, I just added codeblocks to your code.
I just added this line to make it look better. That works great on this forum and also on Discord.
At the start of the code
And at the end of the code
1 Like
Thanks for the edit! I didn’t think to add it (just straight up copy pasted) (ᗒ ᗨᗕ)
1 Like
santi
May 21, 2021, 1:48pm
5
no worries! thanks for the code!
1 Like
system
Closed
June 20, 2021, 1:49pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.