summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/layout/block-sizing.pngbin23032 -> 24503 bytes
-rw-r--r--tests/ref/layout/page.pngbin8104 -> 14273 bytes
-rw-r--r--tests/typ/layout/block-sizing.typ8
-rw-r--r--tests/typ/layout/page.typ9
4 files changed, 17 insertions, 0 deletions
diff --git a/tests/ref/layout/block-sizing.png b/tests/ref/layout/block-sizing.png
index ff95c34c..f6655e63 100644
--- a/tests/ref/layout/block-sizing.png
+++ b/tests/ref/layout/block-sizing.png
Binary files differ
diff --git a/tests/ref/layout/page.png b/tests/ref/layout/page.png
index 4881fa2b..bcf32526 100644
--- a/tests/ref/layout/page.png
+++ b/tests/ref/layout/page.png
Binary files differ
diff --git a/tests/typ/layout/block-sizing.typ b/tests/typ/layout/block-sizing.typ
index a768c3e3..181bbe31 100644
--- a/tests/typ/layout/block-sizing.typ
+++ b/tests/typ/layout/block-sizing.typ
@@ -14,3 +14,11 @@
fill: aqua,
lorem(8) + colbreak(),
)
+
+---
+// 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
+]))
diff --git a/tests/typ/layout/page.typ b/tests/typ/layout/page.typ
index ff050e55..f5c7822d 100644
--- a/tests/typ/layout/page.typ
+++ b/tests/typ/layout/page.typ
@@ -31,3 +31,12 @@
// Should result in one forest-colored A11 page and one auto-sized page.
#page("a11", flipped: true, fill: forest)[]
#pagebreak()
+
+---
+// 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))
+})