Skip to content

Stack Block: set block to fill vertical heightΒ #70988

@davewhitley

Description

@davewhitley

What problem does this address?

It is currently difficult to set a Stack block so that it fills the vertical height of its container. This is a common flexbox feature that should be easier to access in the WordPress editor.

Technically, it's possible by setting the Stack block to 100% minimum height in the style settings, but this is unintuitive, hidden, and assumes knowledge of CSS concepts.

Basically, I think there should be an easier way to set the Stack to align-self: stretch;, without the need to change the min height.

Image Image

What is your proposed solution?

In Figma, you simply select the "stack" and set the height to "fill container". Set the spacing to "auto" to set the items to justify-content: space-between. If you look at the code, the "stack" is set to align-self: stretch;

I propose we add a control to the settings panel or alongside the other alignment controls so that you can easily set the Stack block to fill vertical height.

Image

You can use this block markup to test:

<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":8,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="http://localhost:8890/wp-content/uploads/2025/07/drw158_A_black_and_white_collage_of_plants_on_a_purple_backgrou_1d83faa1-9980-41a4-8ea2-8ef6b83920c6-683x1024.png" alt="" class="wp-image-8"/></figure>
<!-- /wp:image --></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:group {"style":{"dimensions":{"minHeight":"100%"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"left"}} -->
<div class="wp-block-group" style="min-height:100%"><!-- wp:paragraph -->
<p>Top text</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Bottom text</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] ColumnsAffects the Columns Block[Block] GroupAffects the Group Block (and row, stack and grid variants)[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Feature] LayoutLayout block support, its UI controls, and style output.[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions