Making wp-block-embed-youtube responsive
Halfway through writing my own CSS to make Wordpress’ Youtube embeds do responsive resizing, I found out that Wordpress can do it for you. You just need to put this line into functions.php
:
add_theme_support( 'responsive-embeds' );
Fixed. Now when you paste a Youtube URL into the block editor (Gutenberg), Wordpress will make it look right with no further messing around needed.
(Though I do wonder: why isn’t this just done by default? The block editor brings in its own CSS to do columns and such – responsive embeds should be in there too.)