Set font size over 30

I do this:

  • create a CSS file in your vault: .obsidian/snippets/general-font-size.css
  • add the CSS below
  • in Settings > Appearance > CSS Snippets enable the general-font-size snippet

You can change the --custom-font-size-base value to your liking, it should cascade into all values. If you want a different ratio between the font-size of the title and the font-size of the content change the 2 in --custom-title-size: calc(2 * var(--custom-font-size-base)); to a different number. Obsidian should immediately reflect the changed CSS.

/****************************************************************************/
/* Adjust content and metadata styling. Not tabs. */
/****************************************************************************/
:root {
  /* ADJUST THIS VALUE TO YOUR LIKING */
  --custom-font-size-base: 20px;
  --custom-font-size: calc(1 * var(--custom-font-size-base));
  --custom-title-size: calc(2 * var(--custom-font-size-base));
}

.cm-contentContainer,
.metadata-container,
.is-live-preview,
.markdown-reading-view,
.markdown-preview-view {
  font-size: var(--custom-font-size);
}

.inline-title {
  font-size: var(--custom-title-size);
}

3 Likes