Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
It's always the Embeds
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Robert Dall
August 27, 2016
Design
3.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
It's always the Embeds
Embeds and Responsive Design. Given at the WordCamp Vancouver 2016.
Robert Dall
August 27, 2016
More Decks by Robert Dall
See All by Robert Dall
How to connect Github and Asana
robertdall
0
8k
How to submit a Trac Ticket
robertdall
0
150
Taking your website backgrounds to the next level
robertdall
0
2.5k
Other Decks in Design
See All in Design
2026-04-06 CMU School of Design "Vision-Driven Design"
ishii_mit
0
140
「おすすめ」はなぜ信用されないのか - 信頼を築くUI/UX設計
ryu1013
0
250
広い関与の可能性に どう向き合うのか? 私たちは。|Timee MarketingDesign 2026-06-18
bebe
0
830
“なんとなくFigma”から一歩先へ。AI時代も活きるWeb制作フロー
ayumidesign
0
210
Claudeもくもく会、はじめませんか?
yusukeiyoda
0
200
デザインとフロントエンドの境界が融ける Claude Code × Figma
littlebusters
2
3.5k
速く作れるかではなく、速く学べるか ― 学習ループを回すパイロットの途中報告
nagata03
0
640
ポートフォリオ_あやの
ngyenmazt1412
0
1.6k
A Corrida Maluca - Comedy Storyboard
gioli
0
110
富山デザイン勉強会_デザイン思考.pdf
keita_yoshikawa
3
150
Accelerating performance improvement based on a software review evaluation matrix
kitanosirokuma
0
290
トランジションの冒険 自分と世界を変える冒険の書 / Transition Adventure
dmattsun
2
410
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Bash Introduction
62gerente
615
220k
From π to Pie charts
rasagy
0
350
Paper Plane
katiecoart
PRO
2
53k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
Utilizing Notion as your number one productivity tool
mfonobong
4
570
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Amusing Abliteration
ianozsvald
1
280
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
320
Optimizing for Happiness
mojombo
378
71k
Transcript
IT’S ALWAYS THE EMBE @ROBERTDALL robertdall.com/embeds #WCYVR
FIX (AN OBJECT) FIRMLY AND DEEPLY IN A SURROUNDING MASS.
definition of embed in the dictionary IT’S ALL ABOUT THE EMBEDS #WCYVR robertdall.com/embeds
None
IT’S ALL ABOUT THE EMBEDS WE DID THIS TO OURSELVES
#WCYVR robertdall.com/embeds Columbia Journalism Review NASDAQ New York Magazine The Verge
IT’S ALL ABOUT THE EMBEDS HOW DO WE SOLVE THIS
PROBLEM? FIRST THE PHP… #WCYVR robertdall.com/embeds /** * Add container for videos to make them responsive. */ function rd_add_container_for_video_iframes( $content ) { $content = preg_replace( '#<p>(<iframe src=".+?(vimeo|youtube)\.com/.+?".*?></iframe>)</p>#i', '<div class="responsive-video">$1</div>', $content ); return $content; } add_filter( 'the_content', 'rd_add_container_for_video_iframes' );
IT’S ALL ABOUT THE EMBEDS HOW DO WE SOLVE THIS
PROBLEM? SECOND THE CSS… #WCYVR robertdall.com/embeds .responsive-video iframe { height: 100%; left: 0; position: absolute; top: 0; width: 100%; } .responsive-video { height: 0; margin: 0 0 1.5em; overflow: hidden; padding-bottom: 56.25%; padding-top: 30px; position: relative; }
IT’S ALL ABOUT THE EMBEDS INTERACTIVE GOOGLE MAPS? YUP IFRAME
AS WELL #WCYVR robertdall.com/embeds WordPress.com Activity Viewer Google Maps container is not responsive Travels to the edge Interactive Map Google Maps container is responsive
IT’S ALL ABOUT THE EMBEDS DIFFERENT PROBLEM SAME SOLUTION #WCYVR
robertdall.com/embeds /** * Add container for Google Maps to make them responsive. */ function rd_add_container_for_google_maps_iframes( $content ) { $content = preg_replace( '#<p>(<iframe src=".+?google\.com/maps.+?".*?></iframe>)</p>#i', '<div class="google-maps">$1</div>', $content ); return $content; } add_filter( 'the_content', 'rd_add_container_for_google_maps_iframes' );
IT’S ALL ABOUT THE EMBEDS THE CSS FOLLOWS SUIT #WCYVR
robertdall.com/embeds .google-maps iframe { height: 100% !important; left: 0; position: absolute; top: 0; width: 100% !important; } .google-maps { height: 0; overflow: hidden; padding-bottom: 75%; position: relative; }
IT’S ALL ABOUT THE EMBEDS WHAT ABOUT ADS? DON’T THEY
USE IFRAMES? #WCYVR robertdall.com/embeds Daily Hive Vancity Buzz The Beaverton The Daily Dot
IT’S ALL ABOUT THE EMBEDS ADS IN A RESPONSIVE DESIGN
#WCYVR robertdall.com/embeds
IT’S ALL ABOUT THE EMBEDS THANK YOU & QUESTIONS? #WCYVR
robertdall.com/embeds RobertDall.com/embeds Twitter: @robertdall I’d like to thank Sergey Biryukov for teaching me about this!