I am not certain whether it is intended or a bug, but, when using stack with a horizontal direction, max width is calculated for each element independently, resulting in a shifted right page margin.
E.g. the following code
this is a #h(1fr) normal paragraph
#stack(dir: ltr, "(1) ", [this is a #h(1fr) stack])
The right margin of the stack is shifted to the right by the width of (1) . (should be noted that this is not fr-specific and affects line breaking as well)
If this is indeed intended, my question is, what, if not stack, should be used for creation of e.g. custom list-like layouts?
It’s definitely still an issue, but I’d just prefer grid out of principle. I’m not aware of something that can be done with a stack, but not a grid.
It’s just a small follow-up, so not too bad imo.
I assume just history. At some point the two functions were considered to be solutions for different use cases (and the defaults of the two may still support that view), but once grid became the “dominant” tool for this kind of task, development of stack stalled. Since you have to actively spend effort to remove something (not just the code, deprecation first and then updating the docs) it just didn’t happen yet.