Skip to content

feat(layout)!: Add Flex::SpaceEvenly#1952

Merged
kdheepak merged 20 commits intomainfrom
kd/add-space-evenly
Jun 28, 2025
Merged

feat(layout)!: Add Flex::SpaceEvenly#1952
kdheepak merged 20 commits intomainfrom
kd/add-space-evenly

Conversation

@kdheepak
Copy link
Copy Markdown
Member

@kdheepak kdheepak commented Jun 28, 2025

Resolves #1951

BREAKING CHANGE: Old Flex::SpaceAround behavior is available by using Flex::SpaceEvenly and new
Flex::SpaceAround now distributes space evenly around each element except the middle spacers
are twice the size of first and last elements

With this change, the following variants of Flex are supported:

  • Flex::Start: Aligns items to the start; excess space appears at the end.
  • Flex::End: Aligns items to the end; excess space appears at the start.
  • Flex::Center: Centers items with equal space on both sides.
  • Flex::SpaceAround (new): Distributes space around items; space between items is twice the edge spacing.
  • Flex::SpaceBetween: Distributes space evenly between items except no space at the edges.
  • Flex::SpaceEvenly (previously Flex::SpaceAround): Distributes space evenly between items and edges.
  • Flex::Legacy: Preserves legacy behavior, placing all excess space at the end.

This aligns behavior of Flex with CSS flexbox more closely.

The following is a screenshot in action:

image

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Breaking Change This change will cause application code to break and must be noted in the breaking changes docs etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename Flex::SpaceAround to Flex::SpaceEvenly and implement Flex::SpaceAround mirroring flexbox behavior

4 participants