Skip to content

fix(ui): make YouTube embeds responsive on mobile#8453

Open
oceansync wants to merge 1 commit into
reactjs:mainfrom
oceansync:fix/youtube-video-overflow
Open

fix(ui): make YouTube embeds responsive on mobile#8453
oceansync wants to merge 1 commit into
reactjs:mainfrom
oceansync:fix/youtube-video-overflow

Conversation

@oceansync
Copy link
Copy Markdown

@oceansync oceansync commented May 26, 2026

Summary

Fixes #8452: Prevent horizontal overflow from fixed-width iframes.

This is achieved by removing hardcoded sizes on iframe elements and adding a style rule for youtube.com/embed iframes to fill the page width while maintaining a 16/9 aspect ratio.

Results

Before:
Overflowing iframe image

After:
Fixed iframe image

Closes reactjs#8452. Prevents horizontal overflow caused by fixed-width iframes.
@github-actions
Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 115.2 KB (🟡 +65 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: YouTube video embeds cause horizontal scrolling/overflow on mobile

1 participant