Skip to content

Commit a10595a

Browse files
committed
Support for align-content: space-evenly
1 parent e533519 commit a10595a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ Reminder: the cross axis is the axis perpendicular to the main axis. Its directi
580580

581581
### alignContent()
582582
- Applies to: `flex containers`
583-
- Values: `start` / `end` / `center` / `stretch` / `spaceBetween` / `spaceAround`
583+
- Values: `start` / `end` / `center` / `stretch` / `spaceBetween` / `spaceAround` / `spaceEvenly`
584584
- Default value: `start`
585585
- CSS name: `align-content`
586586

@@ -600,6 +600,7 @@ Note, `alignContent` has no effect when the flexbox has only a single line.
600600
| **stretch** | <img src="docs_markdown/images/flexlayout-alignItems-column-stretch.png" width="140"/>| <img src="docs_markdown/images/flexlayout-alignItems-row-stretch.png" width="160"/>|
601601
| **spaceBetween** | <img src="docs_markdown/images/flexlayout-alignItems-column-spaceBetween.png" width="160"/> | <img src="docs_markdown/images/flexlayout-alignItems-row-spaceBetween.png" width="160"/>|
602602
| **spaceAround** | <img src="docs_markdown/images/flexlayout-alignItems-column-spaceAround.png" width="160"/> | <img src="docs_markdown/images/flexlayout-alignItems-row-spaceAround.png" width="160"/>|
603+
| **spaceEvenly** | | |
603604

604605
<br/>
605606

Sources/Swift/FlexLayout.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,9 @@ public final class Flex {
13821382
case spaceBetween
13831383
/// Lines are evenly distributed in the flex container, with half-size spaces on either end Play it »
13841384
case spaceAround
1385+
/// Lines are evenly distributed in the flex container
1386+
/// The size of gaps between children and between the parent's edges and the first/last child will all be equal
1387+
case spaceEvenly
13851388
}
13861389

13871390
/**

Sources/Swift/Impl/FlexLayout+Enum.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ extension YGAlign {
4242
static let flexEnd = YGAlignFlexEnd
4343
static let spaceBetween = YGAlignSpaceBetween
4444
static let spaceAround = YGAlignSpaceAround
45+
static let spaceEvenly = YGAlignSpaceEvenly
4546
}
4647

4748
extension YGWrap {
@@ -106,6 +107,7 @@ extension Flex.AlignContent {
106107
case .end: return YGAlign.flexEnd
107108
case .spaceBetween: return YGAlign.spaceBetween
108109
case .spaceAround: return YGAlign.spaceAround
110+
case .spaceEvenly: return YGAlign.spaceEvenly
109111
}
110112
}
111113
}

0 commit comments

Comments
 (0)