Skip to content

Font Size Picker displays incorrect font-sizes in incorrect order. #55744

@tp-cast-ai

Description

@tp-cast-ai

Description

Font Size Picker seems to be broken since v16.9.0 release. See the issue below.

Step-by-step reproduction instructions

  1. Add these font sizes to theme.json:
"fontSizes": [
	{
		"size": "0.5rem",
		"slug": "caption",
		"name": "Caption"
	},
	{
		"size": "1rem",
		"slug": "x-small",
		"name": "XS"
	},
	{
		"size": "2rem",
		"slug": "small",
		"name": "S"
	},
	{
		"size": "3rem",
		"slug": "medium",
		"name": "M"
	},
	{
		"size": "4rem",
		"slug": "large",
		"name": "L"
	},
	{
		"size": "5rem",
		"slug": "x-large",
		"name": "XL"
	},
	{
		"size": "6rem",
		"slug": "xx-large",
		"name": "XXL"
	}
]
  1. Try selecting a font size with Gutenberg plugin disabled (or with Gutenberg plugin v16.8.1), you will see Font Size Picker displayed correctly:
    image

  2. Enable Gutenberg 16.9.0, Font Size Picker displays nonsense - order is incorrect, default sizes displays incorrect values (in pixels, however it still works fine on the frontend)
    image

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Technical FeedbackNeeds testing from a developer perspective.[Feature] TypographyFont and typography-related issues and PRs[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions