summaryrefslogtreecommitdiff
path: root/tests/typ/layout/stack.typ
blob: 729d85fcfb33d7a53775c08519dc096260dccd35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Test stack layouts.

---
#let rect(width, fill) = rect(width: width, height: 1cm, fill: fill)
#stack(
  rect(2cm, rgb("2a631a")),
  rect(3cm, forest),
  rect(1cm, conifer),
)

---
// Test overflowing stack.

#let rect(width, fill) = rect(width: 1cm, height: 0.4cm, fill: fill)
#box(height: 0.5cm, stack(
  rect(3cm, forest),
  rect(1cm, conifer),
))