The layout API consists of the set of classes that control both the horizontal and vertical positioning of html elements
Parent containers are normally given one of the following classes to handle vertical and horizontal positon of its child elements respectively
uscb-layout-column: - Orients child elements vertically inside of their parent container i.e stacking them
uscb-layout-row: - Orients child elements horizontally inside of their parent container i.e next to each other.
Child elements are given flex classes to control both the horizontal and vertical space they cover in their parent element. the classes are as follows:
Flex values range from 5% - 100%, and refelcts the amount of space the child element should span inside the parent container
The layout api supports global responsive breakpoints such as sm, md, lg and xl, see below chart.
sm
max-width: 576px
gt-sm
min-width: 576px
md
max-width: 768px
gt-md
min-width: 768px
lg
max-width: 992px
gt-lg
min-width: 992px
xl
max-width: 1200px
Examples
Layout Scaffolding
I'm position left on desktop width 50% and i'm stacked on tablet and phones width 100%
My class are:
Parent Div Classes: "uscb-flex-row-50" "uscb-flex-row-md-100"
I'm position left on desktop width 50% and i'm stacked on tablet and phones width 100%
My class are:
Parent Div Classes: "uscb-flex-row-50" "uscb-flex-row-md-100"
Layout order
I'm First in the DOM but second when Rendered because my Flex-order is 2
My class are:
Parent Div Classes: "uscb-flex-row-50" "uscb-flex-row-md-100"
I'm Second in the DOM but First when Rendered because my Flex-order is 1
My class are:
Parent Div Classes: "uscb-flex-row-50" "uscb-flex-row-md-100"