slate-css 0.1.0-alpha.14

Layout

Slate uses a 12 column flexbox grid in a series of containers, rows, and columns. Below is an example and an in-depth look at how the layout comes together.

12
11
1
10
2
9
3
8
4
7
5
6
6

Auto width

A standard .col will provide an automatic width inside a row.

1 of 2
2 of 2
1 of 3
2 of 3
3 of 3

Devices

Breakpoints exist for @xs, @s, @m, @xl and @xxl. Below is a table describing the device sizes and breakpoints.

Devices can be targeted by appending @device to any of the columns.

.col@xs .col@s .col@m .col@l .col@xl .col@xxl
Breakpoint 576px ≥576px ≥768px ≥992px ≥1200px ≥1800px
Container None 540px 720px 960px 1140px 1640px
Gutter var(--space)

Stacking

Combine with flex utility classes to change the layout type to column.

.flex-col
.flex-col
.flex-col@xs
.flex-col@xs

Alignment & Spacing

All alignment & spacing can target devices by appending the appropriate @device.

Around

.flex-just-around
.flex-just-around
.flex-just-around

Between

.flex-just-between
.flex-just-between
.flex-just-between

Even

.flex-just-even
.flex-just-even
.flex-just-even

Center

.flex-just-center
.flex-just-center
.flex-just-center

Alignment

Helper classes exist to make align easy. Each alignment class also exists at each device breakpoint, so you can use .row--top or .row-xs-center in combination.

Vertical

By default a column will fill the height of the row. To control the alignment within the row you can use .top, .middle or .bottom.

Start

.flex-align-items-start
.flex-align-items-start
.flex-align-items-start

Center

.flex-align-items-center
.flex-align-items-center
.flex-align-items-center

End

.flex-align-items-end
.flex-align-items-end
.flex-align-items-end

Horizontal

By default a column will fill the height of the row. To control the alignment within the row you can use .top, .middle or .bottom.

.flex-just-start
.flex-just-center
.flex-just-end

Reverse

Reverse will adjust flex-direction from either row-reverse with .row--reverse or column reverse with .col--reverse.

Row

#1 .flex-row-r
#2 .flex-row-r
#3 .flex-row-r

Column Reverse

#1 .flex-col-r
#2 .flex-col-r
#3 .flex-col-r

Order

#1 .order-last
#2
#3 .order-first