Alignment

Included in the CSS are a few dozen utility classes for arranging content. They can be used with or without the flex grid.

These classes are flex box modifiers and depend on the element also having an attribute of display: flex;. When in doubt, use is-d-flex in addition to the class you need!

Rows & Columns

To manually arrange children in a container as in a row or in a column, you can use these helper classes.

.has-direction-row

.has-direction-column

Justify content

To manually apply a justify-content property to an element’s horizontal position (or vertical if the container is a flex column), use the helper class has-justify-content-X, where X is the position you want.

.has-justify-content-flex-start

.has-justify-content-center

.has-justify-content-flex-end

.has-justify-content-space-around

.has-justify-content-space-between

Align Items & Align Content

To manually apply align-items or align-content properties to an element for vertical positioning (or horizontal if the container is a flex column), use the helper class has-align-items-X or has-align-content-X, respectively, where X is the position you want.

align-items

.has-align-items-flex-start

.has-align-items-center

.has-align-items-flex-end

.has-align-items-stretch

align-content

.has-align-content-flex-start

.has-align-content-center

.has-align-content-flex-end

.has-align-content-space-around

.has-align-content-space-between

.has-align-content-stretch

Grow & Shrink

To manually set elements in a container to grow or shrink, add the class has-X-#, where X is grow or shrink, and # is 0 or 1. 0 means disabled, 1 means enabled.

.has-grow-1
.has-grow-1
.has-grow-0
.has-grow-0
.has-shrink-1.has-grow-0
.has-shrink-1.has-grow-0
.has-shrink-0.has-grow-1
.has-shrink-0.has-grow-1

Is there information missing? Edit this page on Github!