Archived topic
Typography Settings in Customizer
3 replies · Started by David on February 20, 2023
Hi - I've read through the docs & forum + additional outside research on typography settings, so I have a fundamental understanding in using px, em, rem, and %. I avoid additional padding and margin unless absolutely necessary as they contribute to a multitude of issues. What I'm a bit stumped on is I've reviewed the GP sites in the Site Library and have noted in both the Line Height and Letter spacing no values set and/or a unit of " - ". In some cases, there is a value set, but the unit is " - ". Yet, with these settings, the associated slider is positioned somewhere midway. A good example is the GP Site titled Explore. I realize from a previous post that you don't recommend any presets; but my question is should each of these values be set and do you have recommendations relative to utilizing px over em/rem for height, spacing & margin? BTW, I'm truly loving GP Premium - fantastic product.
Hi David,
For Line Height and Spacing, if there's no unit, the value is simply multiplied by the Font size of the text.
If there's nothing set, it inherits its value for its parent Container. For Catalyst for instance, the line height is set to the Body.
We don't have any specific recommendations on which to use. It's preferential.
See here for more information: https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
For margins, most of the time, px is used for consistency.
Thanks Fernando. The additional link on Mozilla helped too. The explanation on inheritance is helpful, though I'm a fan of being explicit. Take care and have a great day.
You're welcome, David!