summaryrefslogtreecommitdiff
path: root/tests/suite/layout/layout.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/suite/layout/layout.typ')
-rw-r--r--tests/suite/layout/layout.typ14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/suite/layout/layout.typ b/tests/suite/layout/layout.typ
new file mode 100644
index 00000000..257e478b
--- /dev/null
+++ b/tests/suite/layout/layout.typ
@@ -0,0 +1,14 @@
+--- layout-in-fixed-size-block ---
+// 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
+]))
+
+--- layout-in-page-call ---
+// Layout without any container should provide the page's dimensions, minus its margins.
+#page(width: 100pt, height: 100pt, {
+ layout(size => [This page has a width of #size.width and height of #size.height ])
+ h(1em)
+ place(left, rect(width: 80pt, stroke: blue))
+})