summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-19 15:31:29 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-19 15:52:15 +0200
commita6f260ca39f70f82617eca87855789413715f47d (patch)
tree08141ae619bd21e0544d21433bce759aebc7ba83 /tests/typ
parentfdab7158c91c52a4ace211c804fdd8e9110f56de (diff)
Refactor layouting a bit
Notably: - Handle aspect ratio in fixed node - Inline constraint inflation into pad node
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/insert/square.typ8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/typ/insert/square.typ b/tests/typ/insert/square.typ
index 1c856d4f..07dce4be 100644
--- a/tests/typ/insert/square.typ
+++ b/tests/typ/insert/square.typ
@@ -1,12 +1,18 @@
// Test the `square` function.
---
-Auto-sized square. \
+// Test auto-sized square.
#square(fill: eastern)[
#font(fill: white, weight: bold)
#align(center)
#pad(5pt)[Typst]
]
+---
+// Test relative-sized child.
+#square(fill: eastern)[
+ #rect(width: 10pt, height: 5pt, fill: conifer) \
+ #rect(width: 40%, height: 5pt, fill: conifer)
+]
---
// Test height overflow.