WordPress/twentytwenty

Font size declarations need to be updated

robincornett opened this issue · 3 comments

I've opened a related issue on the main Gutenberg repository, but with WP5.3 coming sooner and no response there, I'm raising the issue here as well.

It appears that the block editor/Gutenberg set normal as the fallback, or default font size. If that size has not been defined, when a block is opened or selected, the font size picker shows the first defined font size, as if it were the selected font size for the block, which is not necessarily the case. There are other issues stemming from using normal instead of an empty value as a fallback, but hopefully the Gutenberg team will pursue those.

For Twenty Twenty, I suggest that the regular font size be renamed to normal to be consistent with the block editor fallbacks.

Hi,
Yes this is a known issue that will need to be solved after 5.3 because we are in a string freeze where we cannot update the text.

The issue is with the slug, not with the text string. Fixing the slug would prevent a selected block from showing "Small" as the current block font size, when a font size has not been set, even if the slug and text string label are different until a fix can be implemented.

Hey @robincornett thank you for reporting this. To work around the issue for the moment I swapped the slug on the Regular font size to normal which allows alphabetical sorting to take over. It's not an ideal solution but it looks as though the theme will need to work around this as upstream still does not have a fix.

I created and merged this PR which resolves this on our end: #989