mirror of
https://github.com/typst/typst
synced 2025-05-21 04:25:28 +08:00
19 lines
438 B
Typst
19 lines
438 B
Typst
// This issue is sort of horrible: When you write `h(1fr)` in a `stack` instead
|
|
// of directly `1fr`, things go awry. To fix this, we now transparently detect
|
|
// h/v children.
|
|
//
|
|
// https://github.com/typst/typst/issues/1240
|
|
|
|
---
|
|
#stack(dir: ltr, [a], 1fr, [b], 1fr, [c])
|
|
#stack(dir: ltr, [a], h(1fr), [b], h(1fr), [c])
|
|
|
|
---
|
|
#set page(height: 60pt)
|
|
#stack(
|
|
dir: ltr,
|
|
spacing: 1fr,
|
|
stack([a], 1fr, [b]),
|
|
stack([a], v(1fr), [b]),
|
|
)
|