Utilities

Flexocss includes a wide set of utility classes for alignment, visibility, spacing, positioning, and more. All utilities support responsive breakpoint prefixes.

Alignment

Control how flex items are positioned along the main and cross axes. All alignment classes support breakpoint prefixes: .fl-{bp}-justify-center, .fl-{bp}-align-items-end, etc.

justify-content

Class CSS property
.justify-startjustify-content: flex-start
.justify-centerjustify-content: center
.justify-endjustify-content: flex-end
.justify-betweenjustify-content: space-between
.justify-aroundjustify-content: space-around
.justify-evenlyjustify-content: space-evenly

justify-center

fl-4
fl-4

justify-between

fl-4
fl-4

align-items

Class CSS property
.align-items-startalign-items: flex-start
.align-items-centeralign-items: center
.align-items-endalign-items: flex-end
.align-items-stretchalign-items: stretch
.align-items-baselinealign-items: baseline

align-items-center

Short
Tall

align-content

Class CSS property
.align-content-startalign-content: flex-start
.align-content-centeralign-content: center
.align-content-endalign-content: flex-end
.align-content-betweenalign-content: space-between
.align-content-aroundalign-content: space-around
.align-content-stretchalign-content: stretch

place-center

.place-center is a shortcut that combines justify-content: center and align-items: center for quick centering.

HTML
<div class="row fluid place-center" style="min-height:200px">
  <div class="fl-box fl-auto">Centered</div>
</div>

Visibility

Show or hide elements with responsive control. All visibility classes support breakpoint prefixes: .fl-{bp}-hidden, .fl-{bp}-visible, etc.

Class CSS property
.hiddendisplay: none
.visibledisplay: initial
.visible-blockdisplay: block
.visible-flexdisplay: flex
.visible-inlinedisplay: inline
.visible-inline-flexdisplay: inline-flex
HTML
<!-- Hidden on mobile, visible from tablet -->
<div class="fl-sm-hidden fl-lg-visible">...</div>

<!-- Visible only on mobile -->
<div class="fl-lg-hidden">...</div>

<!-- Hidden until desktop, then show as flex -->
<div class="fl-sm-hidden fl-sp-visible-flex">...</div>

Padding

Add responsive padding to any element. The pattern is .fl-{bp}-padding-{value}.

HTML
<div class="fl-box fl-sm-padding-8 fl-lg-padding-16 fl-sp-padding-32">
  Responsive padding
</div>

Default values: 0 to 96px in steps of 8. Configurable via the SCSS variables $paddingStep and $paddingNumber.

padding-8
padding-24

Area (vertical padding)

Area classes apply vertical padding (top and bottom) to sections. The pattern is .fl-{bp}-area-{value}.

HTML
<section class="fl-sm-area-32 fl-lg-area-48 fl-sp-area-64 fl-mg-area-96">
  Responsive vertical padding
</section>

Default values: 0 to 160px in steps of 16. Configurable via $gapStepArea and $gapNumberArea.

Text alignment

Control text alignment with responsive prefixes: .fl-{bp}-text-center, .fl-{bp}-text-left, etc.

Class CSS property
.text-lefttext-align: left
.text-centertext-align: center
.text-righttext-align: right
.text-justifytext-align: justify
HTML
<!-- Center on mobile, left from tablet -->
<div class="fl-sm-text-center fl-lg-text-left">...</div>

Order

Change the visual order of flex items without modifying the HTML. Supports responsive prefixes: .fl-{bp}-order-{n}.

Class CSS property
.order-{n}order: n (-10 to 10)
.order-firstorder: -9999
.order-lastorder: 9999
.order-resetorder: 0
HTML
<div class="row fluid fl-sm-gap-8">
  <div class="fl-box fl-8 order-2">Second in HTML, shown second</div>
  <div class="fl-box fl-8 order-1">First in HTML, shown first</div>
</div>

<!-- Responsive: reorder on desktop -->
<div class="fl-box fl-8 fl-sp-order-last">Last on desktop</div>
order-2 (HTML first)
order-1 (HTML second)

Position & fill

Quick positioning and sizing utilities:

Class CSS property
.position-relativeposition: relative
.position-absoluteposition: absolute
.position-fixedposition: fixed
.top-lefttop: 0; left: 0
.top-righttop: 0; right: 0
.bottom-leftbottom: 0; left: 0
.bottom-rightbottom: 0; right: 0
.fillwidth: 100%; height: 100%
.fill-widthwidth: 100%
.fill-heightheight: 100%
.fill-vpwidth: 100vw; height: 100vh

Z-index

Control stacking order with .z-index-{n} where n goes from 0 to 10 by default. Configurable via $zIndex.

HTML
<div class="position-relative z-index-2">Above</div>
<div class="position-relative z-index-1">Below</div>

Margin & padding reset

Force-remove margin or padding from any element:

Class CSS property
.no-paddingpadding: 0
.no-padding-toppadding-top: 0
.no-padding-bottompadding-bottom: 0
.no-padding-leftpadding-left: 0
.no-padding-rightpadding-right: 0
.no-marginmargin: 0
.no-margin-topmargin-top: 0
.no-margin-bottommargin-bottom: 0
.no-margin-leftmargin-left: 0
.no-margin-rightmargin-right: 0
← Previous Breakpoints
Next → Wireframe