Sizing

Width, max-width, height, and min/max height utility classes for controlling element dimensions, and responsive images.

Width

sui-w-full (width: 100%)
w-full
sui-w-auto (width: auto)
w-auto sizes to content
sui-w-screen (width: 100vw)
sui-w-screen — spans the full viewport width
<div class="sui-w-full">100% width</div>
<div class="sui-w-auto">Auto width (content-sized)</div>
<div class="sui-w-screen">100vw width</div>
<div class="sui-min-w-0">min-width: 0 (useful for flex truncation)</div>

Max Width

sui-max-w-sm (320px)
max-w-sm
sui-max-w-md (480px)
max-w-md
sui-max-w-lg (640px)
max-w-lg
Wider caps (only visible in containers wider than this column, shown as descriptions)
sui-max-w-xl
max-width: 800px
sui-max-w-2xl
max-width: 1024px
sui-max-w-full
max-width: 100%
sui-max-w-none
max-width: none
<div class="sui-max-w-sm">max-width: 320px</div>
<div class="sui-max-w-md">max-width: 480px</div>
<div class="sui-max-w-lg">max-width: 640px</div>
<div class="sui-max-w-xl">max-width: 800px</div>
<div class="sui-max-w-2xl">max-width: 1024px</div>
<div class="sui-max-w-full">max-width: 100%</div>
<div class="sui-max-w-none">max-width: none</div>

Height

Height utilities inside a fixed-height container (200px)
h-full
(100%)
h-auto
50%
(inline)
Viewport-relative heights (shown as descriptions)
sui-h-screen
height: 100vh
sui-min-h-screen
min-height: 100vh
sui-max-h-screen
max-height: 100vh
sui-min-h-full
min-height: 100%
sui-max-h-full
max-height: 100%
sui-min-h-0
min-height: 0
<div class="sui-h-full">height: 100%</div>
<div class="sui-h-auto">height: auto</div>
<div class="sui-h-screen">height: 100vh</div>
<div class="sui-min-h-0">min-height: 0</div>
<div class="sui-min-h-full">min-height: 100%</div>
<div class="sui-min-h-screen">min-height: 100vh</div>
<div class="sui-max-h-full">max-height: 100%</div>
<div class="sui-max-h-screen">max-height: 100vh</div>

Images

sui-img-fluid (dashed outline shows the parent)
1200 by 600 demo image scaled to fit
sui-img-frame on <img>
Demo image in a raised frame
sui-img-frame on <figure>
Demo image in a framed figure
sui-img-frame sui-inset sui-rounded-lg
Demo image in an inset frame with large corners
<!-- Scales down to fit, keeps its ratio -->
<div class="sui-text-center" style="width:300px;max-width:100%;">
  <img class="sui-img-fluid" src="..." width="1200" height="600" alt="...">
</div>

<!-- Raised frame directly on the image -->
<div style="width:300px;max-width:100%;">
  <img class="sui-img-frame" src="..." width="1200" height="600" alt="...">
</div>

<!-- Raised frame on a wrapper -->
<figure class="sui-img-frame" style="width:300px;margin:0;">
  <img src="..." width="1200" height="600" alt="...">
</figure>

<!-- Inset frame with large corners (the image corners follow) -->
<figure class="sui-img-frame sui-inset sui-rounded-lg" style="width:300px;margin:0;">
  <img src="..." width="1200" height="600" alt="...">
</figure>

Reference

Class / TokenDescription
sui-img-fluidmax-width: 100%; height: auto. Stays inline, so sui-text-center on the parent centres it.
sui-img-frameRaised frame, on the <img> itself or on a wrapper around one.
sui-rounded-*, sui-raised-lg, sui-inset, sui-pressedCombine with sui-img-frame for other looks.
--sui-img-frame-radiusFrame corner radius (default --sui-radius); a wrapped image's corners follow it, inset by the 8px padding. sui-rounded-* set it.
sui-min-w-0min-width: 0. Lets flex children shrink so text can truncate.
sui-max-w-nonemax-width: none. Removes a max-width cap.
sui-min-vh-100min-height: 100vh. Alias of sui-min-h-screen.

Delete this item?

This action cannot be undone. This will permanently delete the item and remove all associated data.