Skip to content

Square

Square utilities set an element’s width and height to the same value. They exist mainly to guarantee square dimensions before applying .util-radius-all-circle or .util-radius-all-fullborder-radius: 50% only produces a true circle when its box is already square.

Pattern: .util-square-<size>

SizeValue
xs1rem
sm1.5rem
md2rem
lg3rem
xl4rem
xxl6rem
<div class="util-background-odyssey util-square-lg"></div>
<div class="util-square-lg"></div>
<div
class="util-background-odyssey util-square-lg util-radius-all-circle"
></div>
<img src="avatar.jpg" alt="" class="util-square-lg util-radius-all-circle" />

If the source content isn’t naturally square (a rectangular photo, for example), forcing equal width/height stretches it to fit rather than cropping it — pair with object-fit: cover on <img>/<video> elements to crop instead.