summaryrefslogtreecommitdiff
path: root/tests/suite/layout/container.typ
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2024-12-17 06:41:18 -0300
committerGitHub <noreply@github.com>2024-12-17 09:41:18 +0000
commit60f246ece2a088a802759975f68745f29bef8deb (patch)
tree988aa0847f65cea39769b247620ff681c27d73cb /tests/suite/layout/container.typ
parent134638525516995d5947c5b3f98ffbc13784a143 (diff)
Fix sticky blocks at the top of blocks and pages (#5581)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests/suite/layout/container.typ')
-rw-r--r--tests/suite/layout/container.typ25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/suite/layout/container.typ b/tests/suite/layout/container.typ
index 799300f0..9948a00e 100644
--- a/tests/suite/layout/container.typ
+++ b/tests/suite/layout/container.typ
@@ -279,3 +279,28 @@ First!
// Test box in 100% width block.
#block(width: 100%, fill: red, box("a box"))
#block(width: 100%, fill: red, [#box("a box") #box()])
+
+--- issue-5296-block-sticky-in-block-at-top ---
+#set page(height: 3cm)
+#v(1.6cm)
+#block(height: 2cm, breakable: true)[
+ #block(sticky: true)[*A*]
+
+ b
+]
+
+--- issue-5296-block-sticky-spaced-from-top-of-page ---
+#set page(height: 3cm)
+#v(2cm)
+
+#block(sticky: true)[*A*]
+
+b
+
+--- issue-5296-block-sticky-weakly-spaced-from-top-of-page ---
+#set page(height: 3cm)
+#v(2cm, weak: true)
+
+#block(sticky: true)[*A*]
+
+b