Document individual directions

This commit is contained in:
Laurenz 2022-12-22 00:52:42 +01:00
parent 990224c0f8
commit c06d45002a
2 changed files with 21 additions and 7 deletions

View File

@ -20,15 +20,24 @@ use crate::prelude::*;
/// - alignment: Axes<Option<GenAlign>> (positional, settable)
/// The alignment along both axes.
///
/// Horizontal alignments can be `left`, `center`, `right`, `start`, or `end`.
/// The `start` and `end` alignments are relative to the current
/// [text direction](@text/dir).
/// Possible values for horizontal alignments are:
/// - `start`
/// - `end`
/// - `left`
/// - `center`
/// - `right`
///
/// Vertical alignments can be `top`, `horizon`, or `bottom`.
/// The `start` and `end` alignments are relative to the current [text
/// direction](@text/dir).
///
/// Possible values for vertical alignments are:
/// - `top`
/// - `horizon`
/// - `bottom`
///
/// To align along both axes at the same time, add the two alignments using
/// the `+` operator to get a 2d alignment. For example, `top + right` aligns
/// the content to the top right corner.
/// the `+` operator to get a `2d alignment`. For example, `top + right`
/// aligns the content to the top right corner.
///
/// ### Example
/// ```

View File

@ -24,7 +24,12 @@ use crate::prelude::*;
/// The items to stack along an axis.
///
/// - dir: Dir (named)
/// The direction along which the items are stacked.
/// The direction along which the items are stacked. Possible values are:
///
/// - `{ltr}`: Left to right.
/// - `{rtl}`: Right to left.
/// - `{ttb}`: Top to bottom.
/// - `{btt}`: Bottom to top.
///
/// - spacing: Spacing (named)
/// Spacing to insert between items where no explicit spacing was provided.