struct EdgeInsets
Swift
struct EdgeInsets
Per-edge inset around a view's content.
Used by .padding and stored on Yoga boxes as the source of truth for
YGNodeStyleSetPadding on each edge. Prefer the static constructors over
spelling four zeros by hand.
Sources/LavaUI/EdgeInsets.swift:30
Constructors
init(top: Float = 0, leading: Float = 0, bottom: Float = 0, trailing: Float = 0)
Not documented.
Sources/LavaUI/EdgeInsets.swift:36
init(_ edges: Edge, _ amount: Float)
Insets only the sides listed in edges; the rest stay zero.
Sources/LavaUI/EdgeInsets.swift:49
Properties
var bottom: Float
Not documented.
Sources/LavaUI/EdgeInsets.swift:33
var horizontalTotal: Float { get }
Sum of leading and trailing — useful for width arithmetic.
Sources/LavaUI/EdgeInsets.swift:73
var leading: Float
Not documented.
Sources/LavaUI/EdgeInsets.swift:32
var top: Float
Not documented.
Sources/LavaUI/EdgeInsets.swift:31
var trailing: Float
Not documented.
Sources/LavaUI/EdgeInsets.swift:34
var verticalTotal: Float { get }
Sum of top and bottom — useful for height arithmetic.
Sources/LavaUI/EdgeInsets.swift:76
static let zero: EdgeInsets
Not documented.
Sources/LavaUI/EdgeInsets.swift:58
Methods
static func all(_ value: Float) -> EdgeInsets
Not documented.
Sources/LavaUI/EdgeInsets.swift:60
static func horizontal(_ value: Float) -> EdgeInsets
Not documented.
Sources/LavaUI/EdgeInsets.swift:64
static func vertical(_ value: Float) -> EdgeInsets
Not documented.
Sources/LavaUI/EdgeInsets.swift:68