Obsidian Publish: who sets 16px font size on body?

Hi folks.

I’m struggling to theme my Obsidian Publish website and it isn’t very clear. There are many CSS variables, but you never know where they take their values. For example:

--font-text-size is set to 16px on the body element.

I couldn’t find where this value of 16px comes from.

It’s not the font size you configure in your vault’s Appearance settings page as OP seems to ignore all your Appearance settings.

But then where do these value come from?

Another question is how I can set font-size on the <html> element? There should be one set to get rem sizes to work.


We set the 16px within the app.css, which is loaded first on app Publish sites to make sure that there is no unstyled publish content. https://publish.obsidian.md/app.css

In your publish.css, you can replace this with 1 rem, and then set then set the root or body element to calculate it for rem with additional css.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.