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
-
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
gutter
string
align
string
justify
string
wrap
boolean
reverse
boolean
flex-direction
of the row toreverse
gutter
propFig - Examples of some values of the
gutter
propThe gutter uses the
gap
property to indicate the spacing between elements in a stack.align
propFig - Row with
align
prop tobaseline
Align the columns inside a row across the cross axis. The values of the CSS property
align-items
allowed are:justify
propFig - Examples of the
space-between
,space-evenly
andspace-around
values of justify prop.Use the CSS
justify-content
values to justify the content inside of a row.reverse
propFig - Example of a row with a normal direction and a reverse direction.
Change the
flex-direction
of the row torow-reverse
Column
basis
grow
order
order
of the columnwidth
(*) The default value for
flex-basis
iscontent
when usinggrow
to change the size of the columns, if we decide to use based-8 column width, the default should be set toauto
.basis
propFig - Different values of the
basis
propWhen wrapping if has
flex-grow: 1+
, the basis value (small
,medium
,large
) will indicate when the wrap happens.width
propFig - Different column sizes using the 8 columns layout.
The
width
prop 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:
gutter
string
divider
boolean
align
string
as
string
gutter
propThe gutter uses the
gap
property to indicate the spacing between elements in a stack.divider
propFig - Divider with a
gutter: "large"
.padding-bottom
of the divider container should becalc(gutter / 2)
calc(gutter / 2)
align
propas
propSet 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
padding
andbleed
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 ableed="large"
References
Beta Was this translation helpful? Give feedback.
All reactions