Position

Position (Pos for short) lets you place elements at the cardinal points in a Stack or Relative container.


Place elements on cardinal points easily

Just pick a position and place your element. No need to overthink or dive into CSS positioning complexities.

index.html
<div class="Stack">
<div class="Pos-topleft"> Top left </div>
<!-- ... other positions ... -->
</div>
TopLeft
Top
TopRight
Left
Center
Right
BottomLeft
Bottom
BottomRight

Full-width and full-height positions supported as well

Just add full to the Pos class and you’ll get it.

index.html
<div class="Stack">
<div class="Pos-topfull"> Top full </div>
<!-- ... other positions ... -->
</div>
Top full
Bottom full
Left Full
Right Full

Automatic perfect border radius calculation

Pos lets you nudge an element towards the center. While nudging, Pos also calculates the perfect border radius without work on your part!

index.html
<div class="Stack [--radius]">
<div class="Pos-topleft [--nudge:0.5em]"> Top left </div>
<!-- ... other positions ... -->
</div>
Purrrrfect border radius!
TopLeft
Top
TopRight
Left
Right
BottomLeft
Bottom
BottomRight