Layout
Design layouts for mobile screen sizes first.
Usage
The .sta-wrapper class can be used to specify a centrally positioned container with a maximum width. This can be used alongside other layout methods to construct sophisticated design layouts.
Layouts are handled by two complimentary methods:
- A set of template layouts that use CSS Grid.
- A flexible column system for creating custom layouts using CSS Flexbox.
Responsive breakpoints
The following named breakpoints are used as a set of starting points to adapt layouts around:
xsup to 575px.smfrom 576px.mdfrom 768px.lgfrom 992px.xlfrom 1200px.xxlfrom 1400px.
Spacing helpers
The following set of classes can be used to add specific margin and padding values to an element. These specify both the size and type of spacing to use along with an optional direction.
Size values
Fixed to base so wont scale with font sizes.
small0.5remmedium1remlarge1.5remxlarge2rem
Relative to font size.
small-rel0.5emmedium-rel1emlarge-rel1.5emxlarge-rel2em
Varies depending on the width of browser.
small-varcalc(1vw + 0.5rem)medium-varcalc(1vw + 1rem)large-varcalc(2vw + 1rem)xlarge-varcalc(3vw + 1rem)
The following table demonstrates the helper classes available for the 'small' size. To use a different size just replace the small part of the class for a different size value.
| Size | Margin | Padding |
|---|---|---|
| Small (all directions) | .sta-margin--small |
.sta-padding--small |
| Small (top and bottom) | .sta-margin--small-v |
.sta-padding--small-v |
| Small (left and right) | .sta-margin--small-h |
.sta-padding--small-h |
| Small (top only) | .sta-margin--small-top |
.sta-padding--small-top |
| Small (bottom only) | .sta-margin--small-bottom |
.sta-padding--small-bottom |
| Small (left only) | .sta-margin--small-left |
.sta-padding--small-left |
| Small (right only) | .sta-margin--small-right |
.sta-padding--small-right |