Make oembed fill its frame with their video content in Drupal

I recently had issue styling oEmbed Youtube and Vimeo videos. Thanks to this snippet, they fill in the oEmbed frame instead of having to deal with annoying height issues:

iframe:where(.media-oembed-content) {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
}

 

 

Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!