· Archived · #jquery #rwd

In 2011, Trent needed a way to make video embeds on his website squishy. Brainstorming with Chris Coyier and stealing a technique from Theirry Koblentz (at Yahoo at the time), we setup intrinsic ratios on all your YouTube, Vimeo, and other embeds. It sovled a painpoint with responsive videos and is used on over 12 million websites.

Thankfully, you don’t need FitVids anymore and can use CSS now solves the problem for most situations.

iframe[src*=""] {
  aspect-ratio: 16 / 9

That said, I did re-release FitVids as a web component, <fit-vids> for more dynamic usecases. You can read more about <fit-vids> here.