1

Is there a setting in WordPress Gutenberg editor to change the font size of the text we type while writing posts? I mean the text size inside the editor itself, not the published text that blog visitors view.

2

Just click on the settings/cog icon on the right hand side when you are editing paragraph. Then choose Block. You should then see the option to edit font size. You can choose from dropdown menu or type the font size you want.

screenshot

Hope this helps. :)

  • Thanks, but I meant the text size inside the editor itself, not the published text. My bad, I should have been clearer. I've edited my question. – Muhammad Dec 9 '18 at 17:43
  • Oh haha ok sorry. Glad you have it all figured out now! – Glenn Greening Dec 13 '18 at 2:36
2

When we change the paragraph font size in Gutenberg via the block text settings, it will be added inline like:

<p style="font-size:18px">Lorem Ipsum</p>

If we are frequently changing the font-size (or other formatting) like that, it's easy to imagine the state of the content in few years, where most of the content formatting is hard coded.

It could e.g. override the formatting from a new theme if we decide to switch to a new theme later on.

So I would suggest using it with care.

An alternative could be to target the formatting via unobtrusive CSS.

If that's not possible one could then consider adding custom target CSS classes via the Advanced Gutenberg block setting:

enter image description here

that will generate a class attribute like:

<p class="some__custom--class">Lorem Ipsum</p>

where we define the CSS class in the corresponding stylesheet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.