Font size not consistent?


(Rob Jeffrey) #1

Hello all,

I am probably going mad, hopefully I can explain my problem.

When I set a text’s font size to say 14px, it appears to be a different size than the same font at 14px on another site.

Does discourse scale font? E.g if I set a font to 14px, is that just a ratio of another variable?

Specifically I have built a custom header in the theme customization settings and I am trying to match the header with my wordpress site for SSO.

Many thanks for reading this.

Rob


(Mittineague) #2

Only a wild guess. Does the WordPress site have a responsive design? i.e. the

<meta name="viewport"
 content="width=device-width,
 initial-scale=1,
 shrink-to-fit=no"> 

I’m guessing it’s the entire header being smaller and not only the font.


(Rob Jeffrey) #3

Thanks for the reply, my meta tag for wordpress is:

<meta name="viewport" content="width=device-width, initial-scale=1">

It appears the Wordpress fontsize is bigger than discourse at 14px.

Cheers


(Kris) #4

Hmm, we do scale fonts in various places across Discourse… but if you have a specific element set to 14px in your CSS it shouldn’t generally impact that.

Is your site public? If you can post a link I can take a look.


(Rob Jeffrey) #5

Many thanks for your reply Kris,

The discourse site is not public, but the WordPress side is.

http://socialrobotmarketing.com/wordpress-test/

The font in the header is set to 14px but on discourse the same font looks smaller:

Thanks for your help,

Rob


(Mittineague) #6

Out of curiosity, what are the computed line-height values?


(Stephen Chung) #7

There are multiple ways in CSS that a 14px font-size will turn out in display to diff from 14px.

You really need to open up developer tools and check the text elements of both the WP site and Discourse.