-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Feature] Font Library[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
Changing the font family on a block adds both a class and inline styles to the block when rendered in the browser. This behavior is expected and allows one to select a font family.
However, an issue arises when the font family previously assigned to a block is removed from the Font Library. In such cases, the associated class and inline style remain on the block even though the font is no longer available.
Expected Behavior:
One of the expected behaviors is that when a font family is removed from the Font Library, any block that previously utilized this font should have the default font family set and its associated class and inline style cleaned up.
Step-by-step reproduction instructions
- Add a new font family from the Font Library modal.
- Apply this font family to a block and observe the addition of the corresponding class and inline style to the block on the front of the site.
- Remove the added font family from the Font Library modal.
- Observe that, despite the absence of the font, the block retains the class and inline style that references the removed font.
Screenshots, screen recording, code snippet
Environment info
Gutenberg >= 17.6
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Font Library[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.