Skip to content

Font Library: Unintended border appears when font is not present #56734

@t-hamano

Description

@t-hamano

Description

The Global Style Typography panel displays an unnatural border when the theme does not define a font.

fonts-border

I'm wondering if it would be a good idea to display a copy like below if the font doesn't exist.

fonts-suggest

This is similar to the UI when there is no custom color palette.

palette-edit

Step-by-step reproduction instructions

  • Enable EmptyTheme. This theme does not define any fonts.
  • Open the site editor and access the Global Styles Typography panel.
  • You should now see a border in the Fonts section.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] TypographyFont and typography-related issues and PRs[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions