diff options
| author | PgBiel <9021226+PgBiel@users.noreply.github.com> | 2024-12-17 06:41:18 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-17 09:41:18 +0000 |
| commit | 60f246ece2a088a802759975f68745f29bef8deb (patch) | |
| tree | 988aa0847f65cea39769b247620ff681c27d73cb /tests | |
| parent | 134638525516995d5947c5b3f98ffbc13784a143 (diff) | |
Fix sticky blocks at the top of blocks and pages (#5581)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/issue-5296-block-sticky-in-block-at-top.png | bin | 0 -> 277 bytes | |||
| -rw-r--r-- | tests/ref/issue-5296-block-sticky-spaced-from-top-of-page.png | bin | 0 -> 277 bytes | |||
| -rw-r--r-- | tests/ref/issue-5296-block-sticky-weakly-spaced-from-top-of-page.png | bin | 0 -> 236 bytes | |||
| -rw-r--r-- | tests/suite/layout/container.typ | 25 |
4 files changed, 25 insertions, 0 deletions
diff --git a/tests/ref/issue-5296-block-sticky-in-block-at-top.png b/tests/ref/issue-5296-block-sticky-in-block-at-top.png Binary files differnew file mode 100644 index 00000000..ad0ace76 --- /dev/null +++ b/tests/ref/issue-5296-block-sticky-in-block-at-top.png diff --git a/tests/ref/issue-5296-block-sticky-spaced-from-top-of-page.png b/tests/ref/issue-5296-block-sticky-spaced-from-top-of-page.png Binary files differnew file mode 100644 index 00000000..ad0ace76 --- /dev/null +++ b/tests/ref/issue-5296-block-sticky-spaced-from-top-of-page.png diff --git a/tests/ref/issue-5296-block-sticky-weakly-spaced-from-top-of-page.png b/tests/ref/issue-5296-block-sticky-weakly-spaced-from-top-of-page.png Binary files differnew file mode 100644 index 00000000..9bcdbe56 --- /dev/null +++ b/tests/ref/issue-5296-block-sticky-weakly-spaced-from-top-of-page.png 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 |
