[wp-trac] [WordPress Trac] #25390: Autoembeds - preserve embed ratio on responsive designs

WordPress Trac noreply at wordpress.org
Sun Sep 22 19:00:21 UTC 2013


#25390: Autoembeds - preserve embed ratio on responsive designs
-------------------------+-----------------------------
 Reporter:  Looimaster   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  3.6.1
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 I think that most people can live with the fact that on 1280px wide
 website ($content_width = 1280;) 16:9 YouTube video will be displayed as
 roughly 1280x720px iframe but on responsive resolution (viewport width =
 320px) this becomes 320x720px if a video has `max-width: 100%;` added.

 That's more or less fine.

 But if I use columns shortcodes then I end up with 320x720px video even in
 desktop view which looks like that:

 [[Image(http://gyazo.com/a593f46723b218c5e35794624e9a8b1d.png)]]

 For the time being I'm using PHP and JavaScript to fix this:
 1) Add special CSS class to all embeds.
 2) Preserve pixel ratio with CSS.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25390>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list