Reproduction
- create several blocks, e.g. a button, a text, and an image
- highlight these blocks in the Layers view or press ⌘-G
- Builder creates a new Box and adds all the selected items as children. The new Box has a Stack inner-layout, but lacks
display: flex; flex-direction: column
:
If I then select Row and then Column again, I get the CSS properties I expect:
You can also reproduce this by creating a Box, then dragging items into it. As soon as it has multiple children, it will become a non-flex Stack.
Why this is a problem
Setting the gap
property on an element that doesn’t have display: flex
(or similar) has no effect.
Preferred Solution
As soon as a Box becomes a Stack, give it display: flex; flex-direction: column
.
Alternate Solution
Don’t make the Box a Stack (or row). Users must explicitly opt into that layout. I don’t like this solution because there’s no Static layout in Builder, so this becomes the only way to create an element that has display: block
.