summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-13 15:14:25 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-13 16:04:25 +0100
commitb1b4e52af9e2da8f8ae1fc17a81ed6cbcbb8f525 (patch)
treee97ad140dac6d0414e9b49f7d01abccdcd717d4f /tests/typ
parent72b60dfde751b4a2ab279aa1fcfa559b4a75eb51 (diff)
Block sizing
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/bugs/flow-4.typ5
-rw-r--r--tests/typ/layout/block-sizing.typ16
-rw-r--r--tests/typ/layout/container-fill.typ2
3 files changed, 22 insertions, 1 deletions
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(" ")