Utilities
Many of our components liberally use our utility classes to help compose their intial layouts. Additional styling is only added when neccessary.
Flow
To affect the box structure of an element, use the following classes:
flow
The following classes affect the display property of the parent
element. By default both .flow--flex and
.flow--grid cause the parent to be 100% wide, whereas
.flex--inline will cause the parent to be as wide as the content
within.
.flow--flex.flow--grid.flow--inlineflow__direction
The following classes affect the
flex-direction / grid-auto-flow property of the parent element,
causing the children to be laid out in the parent container in a specific
direction. Please note the natural direction for all flow types is set to row
and will display horizontally.
.flow--flex .flow__direction--column.flow--flex .flow__direction--rowflow__align--horizontal
The following classes affect the
justify-content property of the parent element, causing the
children to align horizontally in the parent element in a specific way. The
classes must be combined with one of the .flow-- classes above to
have any effect. Depending on the .flow-- class used, the
following classes may not appear to have any affect, however, if your parent
element is sufficiently wide, you’ll start to see the children move in the
container.
.flow--flex .flow__align--h-around.flow--flex .flow__align--h-between.flow--flex .flow__align--h-center.flow--flex .flow__align--h-end.flow--flex .flow__align--h-startflow__align--vertical
The following classes affect the
align-items property of the parent element, causing the children
to align vertically in the parent element in a specific way. The classes must
be combined with one of the .flow-- classes above to have any
effect. Depending on the .flow-- class used, the following
classes may not appear to have any affect, however, if your parent element is
sufficiently tall, you’ll start to see the children move in the container.
.flow--flex .flow__align--v-center.flow--flex .flow__align--v-end.flow--flex .flow__align--v-start.flow--flex .flow__align--v-stretchflow__self
Sometimes you want to adjust the positioning of a child within a parent that
is different than all the others’ positioning. If you use the following class
on a child it will adjust the positioning of only that element. It affects the
align-self property of the child. Depending on the track
direction (.flow__direction--) of the parent it will behave
accordingly.
flow__direction--row
.flow__self--center.flow__self--end.flow__self--start.flow__self--stretchflow__direction--column
.flow__self .flow__align--v-center.flow__self .flow__align--v-end.flow__self .flow__align--v-start.flow__self .flow__align--v-stretchflow__size
It’s particularly helpful to define the height/width of a flow item
(specifically one with .flow--inline), the following classes take
their size arguments from the global size property used in other
utility classes. Combined with
.flow--inline .flow__align--h-center .flow__align--v-center
and constrained sizing, it’s easy to have a predictably sized element which
flows within a parent.
.flow__size--h-xs .flow__size--w-xs.flow__size--h-s .flow__size--w-s.flow__size--h-m .flow__size--w-m.flow__size--h-l .flow__size--w-l.flow__size--h-xl .flow__size--w-xl.flow__size--h-xxl .flow__size--w-xxl.flow__size--h-xxxl .flow__size--w-xxxlSpecialty classes
The following classes can only be applied to other flow parents with either
flow--flex or flow--inline, as their styling only
apply to flex items.
flow__flex--grow / flow__flex--shrink
Flow flex properties are meant to control the behavior of a child element when
the alotted space available in the parent provides opportunities to grow or
are constrained in width, causing flex items to normally shrink. Using a
combination of
.flow__flex--grow and .flow__flex--shrink-no for
example would allow an element to fill as much space as the parent allows, but
not ever be smaller than it’s contents.
.flow__flex--grow.flow__flex--grow-no.flow__flex--shrink.flow__flex--shrink-noflow__flex--wrap
Flow wrapping controls a parent’s ability to create a new row of content if it runs out of space. This option is particularly useful when dealing with responsive designs which look great on large screens but need to wrap to a second line on mobile devices. Conversely, you can force items to be contained to one line if necessary—this technique for example works well for things like carousels or slideshows.
.flow__flex--wrap.flow__flex--wrap-noflow__grid--gap
To place an even amount of space between columns and rows within a
.flow--grid parent you can add the following classes:
.flow__grid--gap-xs.flow__grid--gap-s.flow__grid--gap-m.flow__grid--gap-l.flow__grid--gap-xl.flow__grid--gap-xxl.flow__grid--gap-xxxlMargin
To affect the margin property of an element use one of the
following classes:
bottom
.margin__bottom--xs.margin__bottom--s.margin__bottom--m.margin__bottom--l.margin__bottom--xl.margin__bottom--xxl.margin__bottom--xxxlleft
.margin__left--xs.margin__left--s.margin__left--m.margin__left--l.margin__left--xl.margin__left--xxl.margin__left--xxxlright
.margin__right--xs.margin__right--s.margin__right--m.margin__right--l.margin__right--xl.margin__right--xxl.margin__right--xxxltop
.margin__top--xs.margin__top--s.margin__top--m.margin__top--l.margin__top--xl.margin__top--xxl.margin__top--xxxlOomph
To affect the spacing between items in a parent container use one of the following classes:
horizontal
.oomph__h--xs.oomph__h--s.oomph__h--m.oomph__h--l.oomph__h--xl.oomph__h--xxl.oomph__h--xxxlvertical
.oomph__v--xs.oomph__v--s.oomph__v--m.oomph__v--l.oomph__v--xl.oomph__v--xxl.oomph__v--xxxlPadding
To affect the padding property of an element use one of the
following classes:
all
.padding__all--xs.padding__all--s.padding__all--m.padding__all--l.padding__all--xl.padding__all--xxl.padding__all--xxxlbottom
.padding__bottom--xs.padding__bottom--s.padding__bottom--m.padding__bottom--l.padding__bottom--xl.padding__bottom--xxl.padding__bottom--xxxlleft
.padding__left--xs.padding__left--s.padding__left--m.padding__left--l.padding__left--xl.padding__left--xxl.padding__left--xxxlright
.padding__right--xs.padding__right--s.padding__right--m.padding__right--l.padding__right--xl.padding__right--xxl.padding__right--xxxltop
.padding__top--xs.padding__top--s.padding__top--m.padding__top--l.padding__top--xl.padding__top--xxl.padding__top--xxxlRadius
To affect the border-radius property of an element use one of the
following classes:
all
.radius--xs.radius--s.radius--m.radius--l.radius--xl.radius--xxl.radius--xxxltl
.radius__tl--xs.radius__tl--s.radius__tl--m.radius__tl--l.radius__tl--xl.radius__tl--xxl.radius__tl--xxxltr
.radius__tr--xs.radius__tr--s.radius__tr--m.radius__tr--l.radius__tr--xl.radius__tr--xxl.radius__tr--xxxlbl
.radius__bl--xs.radius__bl--s.radius__bl--m.radius__bl--l.radius__bl--xl.radius__bl--xxl.radius__bl--xxxlbr
.radius__br--xs.radius__br--s.radius__br--m.radius__br--l.radius__br--xl.radius__br--xxl.radius__br--xxxlWidth
To affect the overall width of elements—using a
max-width property—use one of the following classes:
.width__xxs.width__xs.width__s.width__m.width__ml.width__l.width__xl.width__xxl.width__xxxl