diff options
| author | Martin Haug <mhaug@live.de> | 2022-12-21 13:16:59 +0100 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2022-12-21 13:16:59 +0100 |
| commit | c06be6699096535ee6658eda7ce84ea7f428b096 (patch) | |
| tree | d6d79584e102c797e209fa11f6bbfda23585d7e4 /library/src/layout/stack.rs | |
| parent | ba294e2670814243122c9e4f560e0f21a4bec13d (diff) | |
Finish the layout docs
Diffstat (limited to 'library/src/layout/stack.rs')
| -rw-r--r-- | library/src/layout/stack.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/library/src/layout/stack.rs b/library/src/layout/stack.rs index c423b1a3..39e040b3 100644 --- a/library/src/layout/stack.rs +++ b/library/src/layout/stack.rs @@ -4,7 +4,21 @@ use super::{AlignNode, Spacing}; use crate::prelude::*; /// # Stack -/// Arrange content and spacing along an axis. +/// Arrange content and spacing horizontally or vertically. +/// +/// The stack places a list of items along an axis, with optional spacing +/// between each item. +/// +/// ## Example +/// ``` +/// #stack( +/// dir: ttb, +/// +/// rect(width: 40pt), +/// rect(width: 120pt), +/// rect(width: 90pt), +/// ) +/// ``` /// /// ## Parameters /// - items: StackChild (positional, variadic) |
