Currently, #alternatives always lays out elements as inline elements (wrapping them in a box).
This change adds a mode where alternatives can lay elements out as block elements. There are two reasons I can think of that someone might want to do this.
For relative width elements, it makes sense to have them laid out as a block and take up the full width of the page, rather than being given 0 width and then not getting laid out properly. See issue #127, which this fixes.
For content which one would like to align on the page, we can't do this the naive way by passing it to #alternatives directly since it gets put in a minimum width container that is then inlined. To work around this, one would have to put an align statement outside the alternatives or put the content inside a block before passing it to #alternatives.
Thanks for looking at this! I also added a test and a section to the book. Let me know if anything else would help to make this easier to merge if you agree with the change (I see that you mention you're quite time-poor in other PRs).
First, thanks for this great library!
Currently,
#alternatives
always lays out elements as inline elements (wrapping them in abox
).This change adds a mode where
alternatives
can lay elements out as block elements. There are two reasons I can think of that someone might want to do this.#alternatives
directly since it gets put in a minimum width container that is then inlined. To work around this, one would have to put an align statement outside thealternatives
or put the content inside ablock
before passing it to#alternatives
.Thanks for looking at this! I also added a test and a section to the book. Let me know if anything else would help to make this easier to merge if you agree with the change (I see that you mention you're quite time-poor in other PRs).