Skip to content

Bug: Fluid typography edits leave stale size value in theme.json #789

@henriqueiamarino

Description

@henriqueiamarino

When editing Custom Fluid Typography values in the Site Editor, the plugin correctly updates the fluid object (min and max) inside theme.json, but fails to update the corresponding size value. The size property retains its previous value after saving, resulting in an inconsistent, outdated typography definition.

Steps to Reproduce

1.	Go to Styles → Typography and edit a Custom Fluid typography size.
2.	Change both Minimum and Maximum sizes.
3.	Click Save to update the theme via Create Block Theme.
4.	Check the generated theme.json.

Actual Behavior

In theme.json, only the fluid values are updated. Even after setting 5.63rem in the Editor, the size value remains "3rem" (or whatever it was before the change).

"fontSizes": [
  {
    "slug": "custom-fluid",
    "name": "Custom Fluid",
    "fluid": {
      "min": "1.5rem",
      "max": "5.63rem"  // updated correctly
    },
    "size": "3rem"      // ❌ still old value
  }
]
Image

Expected Behavior

The size property should be kept in sync with the user’s chosen Maximum size, just like other typography presets created or edited via the Editor. The size should never remain stale once a user updates a custom fluid size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions