From b1b4e52af9e2da8f8ae1fc17a81ed6cbcbb8f525 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 13 Feb 2023 15:14:25 +0100 Subject: Block sizing --- tests/typ/bugs/flow-4.typ | 5 +++++ tests/typ/layout/block-sizing.typ | 16 ++++++++++++++++ tests/typ/layout/container-fill.typ | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tests/typ/bugs/flow-4.typ create mode 100644 tests/typ/layout/block-sizing.typ (limited to 'tests/typ') diff --git a/tests/typ/bugs/flow-4.typ b/tests/typ/bugs/flow-4.typ new file mode 100644 index 00000000..f49873f5 --- /dev/null +++ b/tests/typ/bugs/flow-4.typ @@ -0,0 +1,5 @@ +// In this bug, a frame intended for the second region ended up in the first. + +--- +#set page(height: 105pt) +#block(lorem(20)) diff --git a/tests/typ/layout/block-sizing.typ b/tests/typ/layout/block-sizing.typ new file mode 100644 index 00000000..a768c3e3 --- /dev/null +++ b/tests/typ/layout/block-sizing.typ @@ -0,0 +1,16 @@ +// Test blocks with fixed height. + +--- +#set page(height: 100pt) +#set align(center) + +#lorem(10) +#block(width: 80%, height: 60pt, fill: aqua) +#lorem(6) +#block( + breakable: false, + width: 100%, + inset: 4pt, + fill: aqua, + lorem(8) + colbreak(), +) diff --git a/tests/typ/layout/container-fill.typ b/tests/typ/layout/container-fill.typ index ab5913ab..34849d88 100644 --- a/tests/typ/layout/container-fill.typ +++ b/tests/typ/layout/container-fill.typ @@ -1,6 +1,6 @@ #set page(height: 100pt) #let words = lorem(18).split() -#block(inset: 8pt, fill: aqua, stroke: aqua.darken(30%))[ +#block(inset: 8pt, width: 100%, fill: aqua, stroke: aqua.darken(30%))[ #words.slice(0, 12).join(" ") #box(fill: teal, outset: 2pt)[incididunt] #words.slice(12).join(" ") -- cgit v1.2.3