Skip to content

Commit

Permalink
Add documentation for responsive-embeds theme option (#11011)
Browse files Browse the repository at this point in the history
* Add documentation for responsive-embeds theme option

* Tweak the docs
  • Loading branch information
notnownikki committed Oct 24, 2018
1 parent 87ca7af commit 184b10c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/extensibility/theme-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,19 @@ Core blocks include default styles. The styles are enqueued for editing but are
```php
add_theme_support( 'wp-block-styles' );
```

## Responsive embedded content

The embed blocks automatically apply styles to embedded content to reflect the aspect ratio of content that is embedded in an iFrame. A block styled with the aspect ratio responsive styles would look like:

```html
<figure class="wp-embed-aspect-16-9 wp-has-aspect-ratio">
...
</figure>
```

To make the content resize and keep its aspect ratio, the `<body>` element needs the `wp-embed-responsive` class. This is not set by default, and requires the theme to opt in to the `responsive-embeds` feature:

```php
add_theme_support( 'responsive-embeds' );
```

0 comments on commit 184b10c

Please sign in to comment.