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
Fig - Example of a row with a normal direction and a reverse direction.
Change the flex-direction of the row to row-reverse
Column
Name
Type
Default
Description
basis
string
"content" *
Initial length of the column
grow
string
"0"
Spacing between stacked elements
order
number
-
Change the order of the column
width
string
-
Change the width of the column
(*) The default value for flex-basis is content when using grow to change the size of the columns, if we decide to use based-8 column width, the default should be set to auto.
basis prop
Fig - Different values of the basis prop
When wrapping if has flex-grow: 1+, the basis value (small, medium, large) will indicate when the wrap happens.
Set the HTML tag of the component to the following:
<div>: default value
<ul>: set the stack as an unordered list
<ol>: set the stack as an ordered list
Padding and bleed
I see these properties as transversal across the 3 components. Both padding and bleed have the same variables, and the bleed prop is based on the negation of the padding values as margin (bleed = calc(var($padding-value) * -1);)
Fig. - Example of a stack with a padding="large" and an element with a bleed="large"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Layout components
Proposal for the following layout components:
The structure and different applied properties can be found in the live demo:
https://codepen.io/AlexBueno/project/editor/ZoERKd
Row & Column
Row
gutterstringalignstringjustifystringwrapbooleanreversebooleanflex-directionof the row toreversegutterpropFig - Examples of some values of the
gutterpropThe gutter uses the
gapproperty to indicate the spacing between elements in a stack.alignpropFig - Row with
alignprop tobaselineAlign the columns inside a row across the cross axis. The values of the CSS property
align-itemsallowed are:justifypropFig - Examples of the
space-between,space-evenlyandspace-aroundvalues of justify prop.Use the CSS
justify-contentvalues to justify the content inside of a row.reversepropFig - Example of a row with a normal direction and a reverse direction.
Change the
flex-directionof the row torow-reverseColumn
basisgroworderorderof the columnwidth(*) The default value for
flex-basisiscontentwhen usinggrowto change the size of the columns, if we decide to use based-8 column width, the default should be set toauto.basispropFig - Different values of the
basispropWhen wrapping if has
flex-grow: 1+, the basis value (small,medium,large) will indicate when the wrap happens.widthpropFig - Different column sizes using the 8 columns layout.
The
widthprop changes the width of the columns based on an 8 columns grid layout. The proposed values are 1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8.Stack
Component proposed props:
gutterstringdividerbooleanalignstringasstringgutterpropThe gutter uses the
gapproperty to indicate the spacing between elements in a stack.dividerpropFig - Divider with a
gutter: "large".padding-bottomof the divider container should becalc(gutter / 2)calc(gutter / 2)alignpropaspropSet the HTML tag of the component to the following:
<div>: default value<ul>: set the stack as an unordered list<ol>: set the stack as an ordered listPadding and bleed
I see these properties as transversal across the 3 components. Both
paddingandbleedhave the same variables, and the bleed prop is based on the negation of the padding values as margin (bleed = calc(var($padding-value) * -1);)Fig. - Example of a stack with a
padding="large"and an element with ableed="large"References
Beta Was this translation helpful? Give feedback.
All reactions