I want to set a minimum width for a box(): if the width of the content is smaller than the minimum width min-width, then the box's width is min-width, otherwise it is the size of the content.
I know that there exists a hacky solution to do that by using a stack(): box(stroke: 1pt, stack(dir: ttb, h(min-width), [This is my content])).
However, isn't there a more idiomatic solution? The last mention that I found of this solution on this Discord servers was 7 months ago. Also, isn't there a solution that takes into account the potentiel inset/outset of the box?
The following solutions do not work:
#box(width: calc.min(min-width, auto))[This is my content]
Error: cannot compare auto and length
#box(min-width: min-width)[This is my content]
Error: unexpected argument: min-width