dialog-lightboxv0.3.1

Cropped thumbnails

Crop thumbnails with CSS, not on the server.

The thumbnail keeps the whole photo and object-fit: cover cuts the square, so the box can open with a zoom out of the crop to the whole photo, and close back into it.

live · Cropped thumbnails
  • Soft bands of violet, yellow, mint and purple
  • Amber stripes across dark red
  • Purple, a band of orange, and pale lilac
  • A pale green band between mint and dark green
example.html
<ul id="frames" class="squares" role="list">
  <li><a href="/media/photo-7-1600.jpg" data-dlb-width="1600" data-dlb-height="1066"><img src="/media/photo-7-480.jpg" alt="Soft bands of violet, yellow, mint and purple" /></a></li>
  <li><a href="/media/photo-4-1600.jpg" data-dlb-width="1066" data-dlb-height="1600"><img src="/media/photo-4-480.jpg" alt="Amber stripes across dark red" /></a></li>
  <li><a href="/media/photo-6-3200.jpg" data-dlb-width="3200" data-dlb-height="800"><img src="/media/photo-6-720.jpg" alt="Purple, a band of orange, and pale lilac" /></a></li>
  <li><a href="/media/photo-5-1600.jpg" data-dlb-width="1066" data-dlb-height="1600"><img src="/media/photo-5-480.jpg" alt="A pale green band between mint and dark green" /></a></li>
</ul>
/