Dev Helpers

Tailwind CSS / Media treatments

Zoomed detail window

Dev Helpers · May 11, 2026

A zoom frame pairs overflow control with a scale utility on the image. The frame stays in the grid while its contents magnify.

Worked example

<figure
  class="demo overflow-hidden w-36 [&_img]:scale-[1.6] [&_img]:origin-[60%_30%]"
>
  <img
    alt="Study in geometric shapes"
    width="150"
    height="72"
    src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='72'%3E%3Ccircle cx='80' cy='30' r='20' fill='teal'/%3E%3C/svg%3E"
  />
</figure>

Implementation notes

A transformed image may paint beyond its original box even when the card's dimensions stay fixed. Clip the visual surface without clipping controls below it.

Try it yourself

Inspect the image edges during keyboard focus as well as pointer hover.

Open the Tailwind CSS example →

Editorial date May 11, 2026 · Published December 6, 2026

Related articles

Selection background swatch

The selection variant lets a component specify its own selected-text colours. Readability depends on the selected foreground as well as the highlight.

Skew a label

A skew utility changes the painted shape without allocating extra room for the slanted edge. A separate inner wrapper can keep lettering upright.

Horizontal flex row

Flex utilities define the row but children can still resist shrinking. Inspect long labels before adding more breakpoints.