Burro

Progress on individual margins

Weekly progress update since 2023-10-19 • 2023-10-26Michael Rees


I've been working on adding individual margin controls, like .margin_left, .margin_right, etc. For some minor bikeshedding, I'm still not sure if I like .margin_left or .left_margin better. I might try both out and see which one ends up feeling more natural.

The reason I've pushed this off for so long has nothing to do with implementing those commands themselves but instead is because I haven't been able to decide how to handle the reset command. For example, what should happen in each of these situations?

.start
.margins[2in]
.margin_left[3in]
.margins[-]

or

.start
.margin_left[4in]
.margins[1in]
.margin_left[2in]
.margins[3in]
.margin_left[-]

So far, I've implemented everything but the reset command, because I'm still deciding how to handle these situations. I'm not sure there is a clear path forward here. I'm leaning towards extending the "scope" of both the group .margins command and the individual commands eo being equivalent, so that .margins[-] undoes the most recent action, even if it was limited to just a single margin. In this case, the final state of the first example is 2 inch margins all around, and the final state of the second example is a 3 inch margin on right, top, and bottom, and a 2 inch left margin.

I think this is the best path because it seems to contain the fewest gotchas for a newcomer. It's worth noting that this is a corner of Burro that probably won't be found all that often. As long as we document this clearly, I think we can justify whatever path we end up taking.

Have a comment or want to start a discussion? Please email it to the Burro discussion list!