Fonts

VariableDescription
--font-interface-themeFont used for UI elements
--font-text-themeFont used for text in the editor
--font-monospace-themeFont used for monospaced content such as code blocks and inline code

Font size

Obsidian uses both relative and fixed font sizes depending on the context.

  • Use --font-* (relative) variables in the editor.
  • Use --font-ui-* (fixed) variables for UI elements.
VariableDefault valueDescription
--font-text-size16pxEditor font size. Defined by the user under Appearance settings.
--font-smallest0.8em
--font-smaller0.875em
--font-small0.933em
--font-ui-smaller12px
--font-ui-small13px
--font-ui-medium15px
--font-ui-larger20px

Font weight

VariableDefault value
--font-thin100
--font-extralight200
--font-light300
--font-normal400
--font-medium500
--font-semibold600
--font-bold700
--font-extrabold800
--font-black900

Text formatting

As of Obsidian 1.6 --bold-modifier is the recommended way to change the weight of bolded text. The bold modifier value stacks on top of other font weights. This allows text which may already be bolded to have an even heavier weight, e.g. ## Bold **bolder**. Recommended values for --bold-modifier are between 100 and 300.

VariableDescription
--font-weightRegular text weight
--bold-modifierAdded weight for bolded text
--bold-weightBold text font weight
--bold-colorBold text color
--italic-colorItalic text color

Line heights

VariableDefault valueDescription
--line-height-normal1.5Default line height
--line-height-tight1.3Used in search results, tree items, tooltips, and other smaller spaces

Paragraph spacing

VariableDescription
--heading-spacingSpacing above headings
--p-spacingSpacing between paragraphs