Skip to content

Instantly share code, notes, and snippets.

Last active February 11, 2022 16:10
What would you like to do?
fixed-width fonts and ligature preservation in edit mode
:root {
--font-monospace: "MonoLisa", "JetBrains Mono", "Consolas", monospace !important;
--font-family-preview-edit-code: "MonoLisa", "JetBrains Mono", "Consolas", monospace !important;
--text-family-inline-code: "MonoLisa", "JetBrains Mono", "Consolas", monospace !important;
--rb-indent-font-family: "MonoLisa", "JetBrains Mono", "Consolas", monospace !important;
* Use fixed-width font for edit mode
.cm-s-obsidian .hmd-fold-html kbd,
.markdown-preview-view :not(pre) > code,
.markdown-preview-view pre,
.markdown-source-view.mod-cm6 .cm-scroller,
.cm-hmd-list-indent .cm-hmd-list-indent-1, .markdown-preview-sizer, .CodeMirror,
textarea {
font-family: var(--font-monospace) !important;
* Preserves ligatures regardless of theme (e.g. Blue Topaz).
* Any value other than 'normal' disables ligatures.
letter-spacing: normal !important;
* MonoLisa script italics
font-feature-settings: "ss01" 1, "ss03" 0, "ss05" 1, "ss06" 0, "calt" 1, "ss02" 1, "zero" !important;
* Disable small font for header prefixes in Blue Topas
div.CodeMirror-activeline .CodeMirror-line,
div:not(.CodeMirror-activeline)>.CodeMirror-line {
font-size: 1em;
Copy link

pmbauer commented Feb 11, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment