diff options
Diffstat (limited to 'tests/typ/layout')
| -rw-r--r-- | tests/typ/layout/block-sizing.typ | 8 | ||||
| -rw-r--r-- | tests/typ/layout/page.typ | 9 |
2 files changed, 17 insertions, 0 deletions
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)) +}) |
