Skip to content

Commit fe28ae1

Browse files
committed
Update position comment
1 parent ee2d86c commit fe28ae1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Sources/Swift/FlexLayout.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public final class Flex {
545545
}
546546

547547
//
548-
// MARK: Absolute positionning
548+
// MARK: Position / Insets
549549
//
550550

551551
/**
@@ -581,7 +581,6 @@ public final class Flex {
581581

582582
/**
583583
Set the top edge distance from the container top edge in pixels.
584-
This method is valid only when the item position is absolute (`view.flex.position(.absolute)`)
585584
*/
586585
@discardableResult
587586
public func top(_ value: CGFloat) -> Flex {
@@ -1424,11 +1423,11 @@ public final class Flex {
14241423
/**
14251424
*/
14261425
public enum Position {
1427-
/// Default value. Positioned according to the flex container's flow. The item offset is positioned using properties top, bottom, left, right, start, end.
1426+
/// Default value. Positioned according to the flex container's flow. The item is positioned using Insets properties (top, bottom, left, right, start, end) from its normal position within its flex container and will take up space within the flex container. This node will always form a containing block.
14281427
case relative
1429-
/// Positioned absolutely, removed from the flex container's flow. The item is positioned using properties top, bottom, left, right, start, end.
1428+
/// Positioned absolutely, removed from the flex container's flow. The item is positioned using Insets properties (top, bottom, left, right, start, end). Insets will offset the node from its containing block.
14301429
case absolute
1431-
/// Positioned like relative but ignores insets.
1430+
/// Positioned like relative but ignores insets and will not form a containing block.
14321431
case `static`
14331432
}
14341433

0 commit comments

Comments
 (0)