Skip to content

Add support for presets in minimum height fields #48810

@cbirdsong

Description

@cbirdsong

The cover block has long supported entering custom minimum height values, and support was just added to the group and post content blocks: https://make.wordpress.org/core/2023/03/06/minimum-height-dimensions-block-support/

However, entering in a simple custom value rarely works well for responsive web design. vh units can work decently, but the field defaults to px and the particulars of the different CSS unit options are not easy for content editors to understand. On top of that, you really need to be able to use min, max and clamp values for a great responsive design.

To address that, the editor should support registering custom presets for the height field. The default editing experience should have the user pick from a list of presets with an option to enter a custom value, and themes should be able to disable entry of custom values. This would make the height field work exactly like spacing fields.

This could also replace the "Toggle full height" button that switches the cover block to full height since "full" could be one of the presets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Design FeedbackNeeds general design feedback.[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions