Font Size increased unexpectedly


#1

I changed the font of my forum to proxima nova. But now the default font size is very small. If I change by this way -

body {
    font-size: 16px;
}

The font size gets increased automatically for example - topic title font size sets to 23px and so on. Whats the problem?


(Simon Cossar) #2

For Discourse the font size is set at 14px on the html element. Most of the other fonts are sized using the ‘em’ unit. For example the heading of this topic has a size of 1.8 em. To convert an em unit to px you multiply the em unit by the size of the current font (1.8 em * 14px). If you change the font size on the html element or the body element, that change will cascade throughout the application. It’s done that way on purpose. It does mean that if you change the base font size you might have to adjust font sizes and possibly some margins and padding in a few other places.

Maybe you can get away with changing the font size on .container.posts or .topic-body

.container.posts {font-size: 16px;}

That will affect less of the application.