You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flex Layout: create layouts using the power of Flexbox
✨ Branch: flexlayout
Introduction
The Flex Layout is a layout structuring paradigm created in Store Framework to allow the construction of complex layouts. This paradigm uses the concepts of lines and columns to define the desired block structure and positioning on a certain page.
There are two basic building blocks for each Flex Layout:
flex-layout.row
flex-layout.col
If you are already familiar with the Flexbox used in CSS, the Flex Layout should be easy to understand, since Flexbox is already used "under the hood" by flex-layout.row and flex-layout.col.
Flex Layout
With the help of Flex Layout, you can create customized layouts, using the Flexbox structure of lines and columns.
Analyzing the block's documentation, we see that you can use any block array as Flex Layout's children. In addition, you should always use flex-layout.row and flex-layout.col, and NEVERflex-layout alone.
Below, we have an example of a flex layout comprised of a flex-layout.row with two children: an info-card and a rich-text:
Declare the flex-layout.row in the store.home's template blocks and then declare the blocks mentioned above in your home.jsonc file.
Edit the flex-layout.rowchildren, substituting the rich-text block with a flex-layout.col column.
Delete the above-mentioned rich-text block from your theme.
Declare the flex-layout.col block in your home.jsonc file with two image components as children: image#electronics and image#major-appliance, in this order.
✅ Rich-text should not be rendered by flex-layout.row
✅ Add a flex-layout.col inside of flex-layout.row
✅ Define two images as children of flex-layout.col with the correct props for each image
Flex Layout: create layouts using the power of Flexbox
✨ Branch: flexlayout
Introduction
The Flex Layout is a layout structuring paradigm created in Store Framework to allow the construction of complex layouts. This paradigm uses the concepts of lines and columns to define the desired block structure and positioning on a certain page.
There are two basic building blocks for each Flex Layout:
flex-layout.row
flex-layout.col
If you are already familiar with the Flexbox used in CSS, the Flex Layout should be easy to understand, since Flexbox is already used "under the hood" by flex-layout.row and flex-layout.col.
Flex Layout
With the help of Flex Layout, you can create customized layouts, using the Flexbox structure of lines and columns.
Analyzing the block's documentation, we see that you can use any block array as Flex Layout's
children
. In addition, you should always useflex-layout.row
andflex-layout.col
, and NEVERflex-layout
alone.Below, we have an example of a flex layout comprised of a
flex-layout.row
with two children: aninfo-card
and arich-text
:Activity
flex-layout.row
in thestore.home
's templateblocks
and then declare the blocks mentioned above in yourhome.jsonc
file.flex-layout.row
children, substituting therich-text
block with aflex-layout.col
column.rich-text
block from your theme.flex-layout.col
block in yourhome.jsonc
file with two image components as children:image#electronics
andimage#major-appliance
, in this order.image
blocks with the following props:The result should be similar to this:
ℹ️ Remember to access the Flex Layout documentation in case you have any questions during the activity.
If you're still unsure as to how to send your answers, click here.
The text was updated successfully, but these errors were encountered: