Setting Font Sizes in theme.json
I first posted this theme in the Blockbase support forum because I am using the Blockbase theme. I was told that this isn’t really a Blockbase-specific issue, but rather related to how block themes in general work.
I am interested in replicating the font-sizing that I currently have on a traditional theme in a child theme of the BlockBase theme, building from a base font size for a paragraph block up through the heading font sizes, h1 through h6. I understand that this will involve messing around with theme.json in the child theme. I have read a lot about theme.json and have poked around gingerly, but I can’t figure out how font size works. Specifically, I can’t figure out how I can set a base font size and then make that definition the basis for all the other font sizes.
Ideally, I would like to set a base font size to 15px and then use em/rem settings for the rest of the font sizes.
I can see where font sizes are defined under settings/custom/typography/fontSizes, e.g.
“name”: “Extra Large”,
And I can see where that gets referenced in the definition for h2.
What I don’t see is how to set up the base font size that I can use to define the various other sizes. Can I get any help with that?
- The topic ‘Setting Font Sizes in theme.json’ is closed to new replies.