-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
When building patterns or trying to achieve a layout with multiple elements arranged horizontally it would help to have a parent block that would automatically arrange its children on a single line. Columns can be used to arrange things side-by-side, but they add quite a lot of extra nesting if you only need to arrange one set of blocks.
We could leverage the Group block and add a ‘display horizontally’ or ‘act as a row’ option to it. It would wrap its children and act as a ‘flex container’ (display:flex; flex-direction:row;). Further flex parameters could be optional to align and distribute objects.
The benefits:
Instead of the complexity and nesting of the first image below, one could achieve a simple horizontal layout like in the second image.
Another benefit would be simplifying the number of areas where a child block could potentially be added.
The width of the block and its contents would work a little different than columns, which have specified percentage widths. The wrapping block itself would be the full width of its container, but its contents will vary. We should embrace that and provide all the alignment/distribution attributes afforded by flex.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status


