Skip to content

Positioning

Position utilities control the CSS position property and provide offset classes for top and left.

ClassDescription
.util-position-fixedPositioned relative to the viewport; stays in place when scrolling
.util-position-absolutePositioned relative to the nearest positioned ancestor; removed from normal flow
.util-position-relativePositioned relative to its normal position; creates a positioning context for absolute children
.util-position-staticDefault positioning; resets any previously applied position value

Pattern: .util-position-<side>-<direction>-<size>

  • top
  • left
  • pos — positive offset
  • neg — negative offset
SizeValue
md1rem
lg5rem
xl8rem
<div class="util-position-relative">
<div class="util-position-absolute util-position-top-pos-md util-position-left-pos-lg">
Offset 1rem from top and 5rem from left
</div>
</div>

Offset classes support breakpoint suffixes:

<div class="util-position-top-neg-md util-position-top-pos-lg@md">
Negative top on small, positive top on medium+
</div>