Skip to content

What is the best way to replace the existing font with a new font? #376

Answered by welpo
soumendrak asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, right!

tabi uses three fonts: one for headers / main page (sans serif), one for article/page content (serif), and one for code.

The defaults are:

--sans-serif-font: 'Inter', Helvetica, Arial, sans-serif;
--serif-font: 'Source Serif', 'Georgia', serif;
--code-font: 'Cascadia Code';

You'll need to override each variable separately. If you want to use the same font everywhere (except code) I see two options:

  • Override the CSS variable sans-serif-font to match serif-font;
  • Only override serif-font and set override_serif_with_sans = true in your configuration (docs)

Either option should achieve your goal!

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@welpo
Comment options

@soumendrak
Comment options

@welpo
Comment options

@welpo
Comment options

Answer selected by soumendrak
@soumendrak
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants