mirror of
https://github.com/typst/typst
synced 2025-05-15 17:45:27 +08:00
Co-authored-by: Laurenz <laurmaedje@gmail.com> Update tests/typ/layout/stack.typ Co-authored-by: Laurenz <laurmaedje@gmail.com>
19 lines
361 B
Typst
19 lines
361 B
Typst
// Test stack layouts.
|
|
|
|
---
|
|
#let rect(width, color) = rect(width: width, height: 1cm, fill: color)
|
|
#stack(
|
|
rect(2cm, #2a631a),
|
|
rect(3cm, forest),
|
|
rect(1cm, conifer),
|
|
)
|
|
|
|
---
|
|
// Test overflowing stack.
|
|
|
|
#let rect(width, color) = rect(width: 1cm, height: 0.4cm, fill: color)
|
|
#box(height: 0.5cm, stack(
|
|
rect(3cm, forest),
|
|
rect(1cm, conifer),
|
|
))
|