Description
openedon Nov 8, 2018
Is your feature request related to a problem? Please describe.
When the editor-font-sizes
array has been limited to a single item, paragraphs only have one size. If custom font sizes are also disabled, the font size picker becomes a redundant control. See below screenshot:
Describe the solution you'd like
When custom font sizes are disabled, and only a single editor-font-size
is set, the font size picker should not be displayed.
For instance, given the following code:
<?php
add_theme_support( 'editor-font-sizes', array(
array(
'name' => __( 'Normal', 'gutenberg-test' ),
'shortName' => __( 'N', 'gutenberg-test' ),
'size' => 16,
'slug' => 'normal'
),
) );
add_theme_support('disable-custom-font-sizes');
I would expect to see the following:
Describe alternatives you've considered
This could potentially be solved on a case-by-case basis with some custom JS, or by creating a custom block. However, these are not particularly good solutions compared to a simple conditional statement in the original block definition.