Rebuilding the broadcast squeezeback with CSS Grid and WebVTT

The broadcast squeezeback, rebuilt with CSS Grid and WebVTT

Rebuilding the broadcast squeezeback with CSS Grid and WebVTT

A developer explores how to recreate the classic TV 'squeezeback' effect on the web using CSS Grid and WebVTT. By animating grid track sizes, the video shrinks and reveals panels for CTAs, forms, or other content, all without JavaScript animation loops. WebVTT cues act as a timeline, triggering layout changes via the cuechange event. The post also covers ambient lighting effects using canvas, color sampling for dynamic accents, and two CSS gotchas: matching grid totals for smooth interpolation and registering custom properties correctly.

The reveal and the shrink are the same event.

More from this day

2026-08-27