Bookmark Streamline Icon: https://streamlinehq.com
Chapter 4
Circle Clock Streamline Icon: https://streamlinehq.com
5 Mins
Feedback

Layout

Spacing

The vertical space found between page content sections is usually much larger than the spacing found inside a component. This is why we take two different approaches to spacing.

Spacing: Sections

We use classes to add different amounts of vertical space to the top and bottom of sections. We follow the same method originally introduced by Client-First. First we need to set a padding or margin direction followed by the spacing amount. For example .padding-vertical .padding-xhuge.

Class
Result
padding-vertical
Adds padding to top and bottom only
padding-horizontal
Adds padding to left and right only
padding-top
Adds padding to top only
padding-bottom
Adds padding to bottom only
padding-left
Adds padding to left only
padding-right
Adds padding to right only
Class
Result
margin-vertical
Adds margin to top and bottom only
margin-horizontal
Adds margin to left and right only
margin-top
Adds margin to top only
margin-bottom
Adds margin to bottom only
margin-left
Adds margin to left only
margin-right
Adds margin to right only
Class
Result
padding-tiny
0.125rem
padding-xxsm
0.25rem
padding-xsm
0.5rem
padding-sm
1rem
padding-md
2rem
padding-lg
3rem
padding-xl
4rem
padding-xxl
5rem
padding-huge
6rem
padding-xhuge
8rem
padding-xxhuge
10rem
padding-massive
12rem
padding-xmassive
14rem
padding-xxmassive
16rem
Class
Result
margin-tiny
0.125rem
margin-xxsm
0.25rem
margin-xsm
0.5rem
margin-sm
1rem
margin-md
2rem
margin-lg
3rem
margin-xl
4rem
margin-xxl
5rem
margin-huge
6rem
margin-xhuge
8rem
margin-xxhuge
10rem
margin-massive
12rem
margin-xmassive
14rem
margin-xxmassive
16rem
Spacing: Compact Components

Sometimes when creating compact and small components it's best to apply spacing directly to that custom component class. This enables a high-level of control at different breakpoints and avoids class stacking.

FAQs
Do you use any global spacing classes?
Why use attributes vs css combo classes for section spacing?
Containers

Containers allow us to control the horizontal width of content. They also allow us to ensure there is always a consistent amount of horizontal padding on each side of the page.

Use these container classes to apply a max-width value to your page content. You can stack this class on top of component classes or stand-alone.

Class
Description
container
is--sm
Small
container
is--md
Medium
container
is--lg
Large
container
is--xl
Extra Large
Units

Here’s an overview of the different units we use for layout and in what scenario they’re applied.

Unit Name
Use Case
PX
Borders
VW
Border Radius
VH
Section & Component Heights
%
Columns
Aspect Ratio
Images
REM
Everything Else
FAQs
Why don't you recommend column classes?
‍‍