summaryrefslogtreecommitdiff
path: root/src/library/stack.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/stack.rs')
-rw-r--r--src/library/stack.rs40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/library/stack.rs b/src/library/stack.rs
deleted file mode 100644
index 21a0ac35..00000000
--- a/src/library/stack.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-use super::*;
-use crate::layout::{StackChild, StackNode};
-
-/// `stack`: Stack children along an axis.
-///
-/// # Positional parameters
-/// - Children: variadic, of type `template`.
-///
-/// # Named parameters
-/// - Stacking direction: `dir`, of type `direction`.
-///
-/// # Return value
-/// A template that places its children along the specified layouting axis.
-///
-/// # Relevant types and constants
-/// - Type `direction`
-/// - `ltr`
-/// - `rtl`
-/// - `ttb`
-/// - `btt`
-pub fn stack(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
- let dir = args.named::<Dir>(ctx, "dir").unwrap_or(Dir::TTB);
- let children = args.all::<TemplateValue>(ctx);
-
- Value::template("stack", move |ctx| {
- let children = children
- .iter()
- .map(|child| {
- let child = ctx.exec_template_stack(child).into();
- StackChild::Any(child, ctx.state.aligns)
- })
- .collect();
-
- ctx.push_into_stack(StackNode {
- dirs: Gen::new(ctx.state.lang.dir, dir),
- aspect: None,
- children,
- });
- })
-}