summaryrefslogtreecommitdiff
path: root/tests/typ/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-13 18:33:10 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-23 20:22:47 +0200
commit1e74f7c407e42174b631cb7477f3c88252da7e25 (patch)
tree53c0510b6503c434c9ba470b188d9e737ce1c3cf /tests/typ/layout
parent5f4dde0a6b32c7620b29af30f69591cf3995af9b (diff)
New `ShapeNode`
Replaces `BackgroundNode` and `FixedNode`
Diffstat (limited to 'tests/typ/layout')
-rw-r--r--tests/typ/layout/grid-1.typ31
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/typ/layout/grid-1.typ b/tests/typ/layout/grid-1.typ
index 3d0412c2..43a3883d 100644
--- a/tests/typ/layout/grid-1.typ
+++ b/tests/typ/layout/grid-1.typ
@@ -1,23 +1,23 @@
// Test grid layouts.
---
-#let rect(width, fill) = rect(width: width, height: 2cm, fill: fill)
+#let cell(width, color) = rect(width: width, height: 2cm, fill: color)
#page(width: 100pt, height: 140pt)
#grid(
columns: (auto, 1fr, 3fr, 0.25cm, 3%, 2mm + 10%),
- rect(0.5cm, rgb("2a631a")),
- rect(100%, forest),
- rect(100%, conifer),
- rect(100%, rgb("ff0000")),
- rect(100%, rgb("00ff00")),
- rect(80%, rgb("00faf0")),
- rect(1cm, rgb("00ff00")),
- rect(0.5cm, rgb("2a631a")),
- rect(100%, forest),
- rect(100%, conifer),
- rect(100%, rgb("ff0000")),
- rect(100%, rgb("00ff00")),
+ cell(0.5cm, rgb("2a631a")),
+ cell(100%, forest),
+ cell(100%, conifer),
+ cell(100%, rgb("ff0000")),
+ cell(100%, rgb("00ff00")),
+ cell(80%, rgb("00faf0")),
+ cell(1cm, rgb("00ff00")),
+ cell(0.5cm, rgb("2a631a")),
+ cell(100%, forest),
+ cell(100%, conifer),
+ cell(100%, rgb("ff0000")),
+ cell(100%, rgb("00ff00")),
)
#grid()
@@ -51,6 +51,7 @@
#grid(
columns: (1fr,),
rows: (1fr, auto, 2fr),
- [], rect(width: 100%)[A bit more to the top], [],
+ [],
+ box(width: 100%)[A bit more to the top],
+ [],
)
-