diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-17 23:29:58 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-17 23:29:58 +0100 |
| commit | 6bd1a494e09dcc5c1793186f1868c0cae7445a6a (patch) | |
| tree | c6a9212fd0a5024807c932f895c8cef19762aa25 /src/library/align.rs | |
| parent | 49bb7f9a2bd2404fa6e14208041ef6a94068c1ec (diff) | |
Formatting and documentation ✨
Diffstat (limited to 'src/library/align.rs')
| -rw-r--r-- | src/library/align.rs | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/library/align.rs b/src/library/align.rs index 31367a5a..a516ff4c 100644 --- a/src/library/align.rs +++ b/src/library/align.rs @@ -2,26 +2,30 @@ use super::*; /// `align`: Align content along the layouting axes. /// +/// # Positional parameters +/// - Alignments: variadic, of type `alignment`. +/// - Body: optional, of type `template`. +/// /// Which axis an alignment should apply to (main or cross) is inferred from /// either the argument itself (for anything other than `center`) or from the /// second argument if present, defaulting to the cross axis for a single /// `center` alignment. /// -/// # Positional arguments -/// - Alignments: variadic, of type `alignment`. -/// - Body: optional, of type `template`. -/// -/// # Named arguments +/// # Named parameters /// - Horizontal alignment: `horizontal`, of type `alignment`. -/// - Vertical alignment: `vertical`, of type `alignment`. +/// - Vertical alignment: `vertical`, of type `alignment`. +/// +/// # Return value +/// A template that changes the alignment along the layouting axes. The effect +/// is scoped to the body if present. /// /// # Relevant types and constants /// - Type `alignment` -/// - `left` -/// - `right` -/// - `top` -/// - `bottom` -/// - `center` +/// - `left` +/// - `right` +/// - `top` +/// - `bottom` +/// - `center` pub fn align(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value { let first = args.find(ctx); let second = args.find(ctx); |
