Skip to content

Commit 095d4ab

Browse files
authored
Merge pull request #255 from OhKanghoon/task/support-spaceEvenly
Support `align-content`: `space-evenly`
2 parents e533519 + c77f73e commit 095d4ab

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- FlexLayout (2.0.8)
2+
- FlexLayout (2.0.9)
33
- PinLayout (1.10.5)
44
- SwiftLint (0.55.1)
55

@@ -18,7 +18,7 @@ EXTERNAL SOURCES:
1818
:path: "./"
1919

2020
SPEC CHECKSUMS:
21-
FlexLayout: 74c80db7698ea6e0d11e00ba012c0b9f3252938a
21+
FlexLayout: 6904d99efeb7279cb218d10f40a71c4690445ada
2222
PinLayout: f6c2b63a5a5b24864064e1d15c67de41b4e74748
2323
SwiftLint: 3fe909719babe5537c552ee8181c0031392be933
2424

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)