Site logo

Archived topic

Changing default font size of Block (Gutenberg Editor)

7 replies · Started by Frank on March 18, 2021

Viewing posts 1–8 of 8

I've been using the default styling of block editor but WordPress 5.7 has now changed things around that the default font is too small in the block editor, which makes it hard to write.

Oddly enough, I don't think GP is controlling the styling of the editor anymore even though I don't have any function (e.g. remove_action) that would prevent it, unless this changed in a recent theme update?

In any event, is there a way to change font size for the block editor (ONLY the editor, not the front end)?

Hi Frank,

Are you referring to the core paragraph block here?

If so it should be the same font-size you've set in Customizer > Typography > Body.

Are you seeing something different?

Yes, the font size in the block editor is 14px, but the Customizer > Typography > Body font size is set to 18px.

I do not understand this behavior at all. There is nothing in our functions to prevent GP from overriding the block editor styling but it is clearly having no effect on how the editor looks.

Hmm I am not able to replicate this issue using the latest theme and WP version.

Have you tried disabling all plugins to eliminate any conflicts?

Turns out I was looking for the wrong thing, instead of a remove_action function it was a return_false one buried in my custom functions:

add_filter( 'generate_show_block_editor_styles', '__return_false' );

That said, I have to admit the default block editor is very clean looking, it's just the font size that could be improved. Is there a way to disable GP from controlling the editor with an exception made for the font size?

Unfortunately not :(

Ugh, I'll have to find another solution then. Thanks!

No problem :)

This archived topic is closed to new replies.