summaryrefslogtreecommitdiff
path: root/tests/typ/layout/block-sizing.typ
blob: 181bbe31059eef8ba85d1126799303fa680496ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Test blocks with fixed height.

---
#set page(height: 100pt)
#set align(center)

#lorem(10)
#block(width: 80%, height: 60pt, fill: aqua)
#lorem(6)
#block(
  breakable: false,
  width: 100%,
  inset: 4pt,
  fill: aqua,
  lorem(8) + colbreak(),
)

---
// Layout inside a block with certain dimensions should provide those dimensions.

#set page(height: 120pt)
#block(width: 60pt, height: 80pt, layout(size => [
  This block has a width of #size.width and height of #size.height
]))