{"id":15528494,"date":"2022-04-05T12:14:22","date_gmt":"2022-04-05T12:14:22","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/setting-font-sizes-in-theme-json-2\/"},"modified":"2022-04-05T13:55:04","modified_gmt":"2022-04-05T13:55:04","slug":"setting-font-sizes-in-theme-json-2","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/setting-font-sizes-in-theme-json-2\/","title":{"rendered":"Setting Font Sizes in theme.json"},"content":{"rendered":"<p>I first posted this theme in the Blockbase support forum because I am using the Blockbase theme. I was told that this isn&#8217;t really a Blockbase-specific issue, but rather related to how block themes in general work.<\/p>\n<p>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&#8217;t figure out how font size works. Specifically, I can&#8217;t figure out how I can set a base font size and then make that definition the basis for all the other font sizes.<\/p>\n<p>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.<\/p>\n<p>I can see where font sizes are defined under settings\/custom\/typography\/fontSizes, e.g.<br \/>\n{<br \/>\n&#8220;name&#8221;: &#8220;Extra Large&#8221;,<br \/>\n&#8220;size&#8221;: &#8220;32px&#8221;,<br \/>\n&#8220;slug&#8221;: &#8220;x-large&#8221;<br \/>\n}<\/p>\n<p>And I can see where that gets referenced in the definition for h2.<\/p>\n<p>&#8220;h2&#8221;: {<br \/>\n&#8220;typography&#8221;: {<br \/>\n&#8220;fontSize&#8221;: &#8220;var(&#8211;wp&#8211;preset&#8211;font-size&#8211;x-large)&#8221;<br \/>\n}<br \/>\n}<\/p>\n<p>What I don&#8217;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?<\/p>\n","protected":false},"template":"","class_list":["post-15528494","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15528494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15528494\/revisions"}],"predecessor-version":[{"id":15528921,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15528494\/revisions\/15528921"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15528494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}