summaryrefslogtreecommitdiff
path: root/tests/typ/layout/fixed.typ
blob: bcb88fe1a727bb03ff6a316ea7f92baf4c74bc13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Test shrink-to-fit vs fixed.

---
#let right(body) = align(right, body)
#let pad(body) = pad(left: 10pt, right: 10pt, body)

// Top-level paragraph fills page, boxed paragraph only when width is fixed.
L #right[R] \
#rect(width: 50pt)[L #right[R]] \
#rect[L #right[R]]

// Pad inherits expansion behaviour.
#pad[PL #right[PR]] \
#rect(pad[PL #right[PR]])