summaryrefslogtreecommitdiff
path: root/tests/typ/insert/square.typ
blob: dd20ca62d22f8a0a2881e565cb2e2077b446601b (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
25
26
27
28
29
// Test the `square` function.

---
Auto-sized square. \
#square(fill: eastern)[
  #align!(center)
  #pad!(5pt)
  #font!(fill: white, weight: bold)
  Typst
]

---
// Test height overflow.
#page!(width: 75pt, height: 100pt)
#square(fill: conifer)[
  But, soft! what light through yonder window breaks?
]

---
// Test width overflow.
#page!(width: 100pt, height: 75pt)
#square(fill: conifer)[
  But, soft! what light through yonder window breaks?
]

---
// Length wins over width and height.
// Error: 09-20 unexpected argument
#square(width: 10cm, height: 20cm, length: 1cm, fill: rgb("eb5278"))