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

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

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

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