diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-12 22:04:27 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-12 22:04:27 +0100 |
| commit | fd90736fb6239409210f845a8589ba3d6b849ef3 (patch) | |
| tree | c1993400b177f35b3622cc3fdf6c0f53d805bb69 /tests/typ/layout | |
| parent | d99359dede8f366fc16d38c6166b97a0f56fe0cb (diff) | |
Support fractional width for `box`
Diffstat (limited to 'tests/typ/layout')
| -rw-r--r-- | tests/typ/layout/container.typ | 4 | ||||
| -rw-r--r-- | tests/typ/layout/repeat.typ | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/tests/typ/layout/container.typ b/tests/typ/layout/container.typ index c6928074..0b30c4e1 100644 --- a/tests/typ/layout/container.typ +++ b/tests/typ/layout/container.typ @@ -10,6 +10,10 @@ Spaced \ Apart --- +// Test fr box. +Hello #box(width: 1fr, rect(height: 0.7em, width: 100%)) World + +--- // Test block over multiple pages. #set page(height: 60pt) diff --git a/tests/typ/layout/repeat.typ b/tests/typ/layout/repeat.typ index 05b055af..03642164 100644 --- a/tests/typ/layout/repeat.typ +++ b/tests/typ/layout/repeat.typ @@ -12,28 +12,28 @@ ) #for section in sections [ - #section.at(0) #repeat[.] #section.at(1) \ + #section.at(0) #box(width: 1fr, repeat[.]) #section.at(1) \ ] --- // Test dots with RTL. #set text(lang: "ar") -مقدمة #repeat[.] 15 +مقدمة #box(width: 1fr, repeat[.]) 15 --- // Test empty repeat. -A #repeat[] B +A #box(width: 1fr, repeat[]) B --- -// Test spaceless repeat. -A#repeat(rect(width: 2.5em, height: 1em))B +// Test unboxed repeat. +#repeat(rect(width: 2em, height: 1em)) --- // Test single repeat in both directions. -A#repeat(rect(width: 6em, height: 0.7em))B +A#box(width: 1fr, repeat(rect(width: 6em, height: 0.7em)))B #set align(center) -A#repeat(rect(width: 6em, height: 0.7em))B +A#box(width: 1fr, repeat(rect(width: 6em, height: 0.7em)))B #set text(dir: rtl) -ريجين#repeat(rect(width: 4em, height: 0.7em))سون +ريجين#box(width: 1fr, repeat(rect(width: 4em, height: 0.7em)))سون |
