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.)

«
»
ACF (3)
Admin Column (4)
Amps (9)
Breadcrumbs (2)
CSS (6)
Custom post types (4)
Custom Taxonomies (3)
Customizer (4)
Furniture (3)
Hooks & Filters (3)
Jquery (9)
LAMP (10)
Login (5)
Meta boxes (6)
Multisite (2)
My Code (1)
Open Graph Meta Tags (1)
Pedals (9)
Redirects (2)
SEO (4)
Theme Building (5)
Title Tags (2)
Tuners (3)
Turntables (2)
Typography (3)
Uncategorised (57)
User Roles & Capabilities (2)
White labeling (9)
Working with Images (11)
Working with videos (2)
WP Database (1)