summaryrefslogtreecommitdiff
path: root/tests/typ/layout/pad.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-11 14:42:20 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-11 14:42:20 +0200
commit4017b5a9f67e06145129d75de452c8a42e2d2f5a (patch)
tree8ce9c6f80faa75ed62d4f7fbe31d3ceee6e8d4ba /tests/typ/layout/pad.typ
parent4dbd9285c91d59d527f4324df4aaf239ecb007ca (diff)
Push some nodes directly into the stack
Diffstat (limited to 'tests/typ/layout/pad.typ')
-rw-r--r--tests/typ/layout/pad.typ16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/typ/layout/pad.typ b/tests/typ/layout/pad.typ
index 3726ce53..8c23549a 100644
--- a/tests/typ/layout/pad.typ
+++ b/tests/typ/layout/pad.typ
@@ -5,9 +5,19 @@
#pad(left: 10pt, [Indented!])
// All sides together.
-#rect(fill: conifer,
- pad(10pt, right: 20pt,
- rect(width: 20pt, height: 20pt, fill: #eb5278)))
+#rect(fill: conifer)[
+ #pad(10pt, right: 20pt)[
+ #rect(width: 20pt, height: 20pt, fill: #eb5278)
+ ]
+]
// Error: 14-24 missing argument: body
Hi #rect(pad(left: 10pt)) there
+
+---
+// Test that the pad node doesn't consume the whole region.
+
+#page(width: 4cm, height: 5cm)
+#align(left)[Before]
+#pad(10pt, image("../../res/tiger.jpg"))
+#align(right)[After]