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
Robert Dall
August 27, 2016
Design
3.5k
0
Share
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
7.8k
How to submit a Trac Ticket
robertdall
0
140
Taking your website backgrounds to the next level
robertdall
0
2.4k
Other Decks in Design
See All in Design
CULTURE DECK/Creative Director
mhand01
0
1.2k
Mandalyn_DT5001_FinalAssignment.pdf
lynteo
0
230
AI時代に求められるUXデザインのアプローチ
xtone
1
4.3k
デザイナーが主導権を握る、AI協業の本音と実践
satosio
7
3.3k
「デザイン」の自分ごと化から始める、デザインピープルのふるまい
mewmo
0
240
UI/UX & Web Design Portfolio 2025|Madoka Kumagai
madoka_portfolio
4
240
大企業インハウスデザイン組織における DesignOps改革の現在地 / DesignOps at Scale: Navigating Transformation in Large Enterprises
nttcom
0
650
怖くないアクセシビリティ -カウンターカルチャーとしてのアッカン東京-
securecat
1
150
CREATIVE CLASS受講課題|無印良品を題材としたブランド再構築について
happy_ferret153
0
890
新卒2年目デザイナーが、UX検定基礎にチャレンジした話
designer_no_pon
1
1.5k
つくり方を変えていく | change-how-we-build
mottox2
2
1.3k
Diverse Design Team Deck
diverse
0
1.8k
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
AI: The stuff that nobody shows you
jnunemaker
PRO
7
660
A better future with KSS
kneath
240
18k
How to train your dragon (web standard)
notwaldorf
97
6.6k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
240
Documentation Writing (for coders)
carmenintech
77
5.3k
Ethics towards AI in product and experience design
skipperchong
2
280
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
220
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
It's Worth the Effort
3n
188
29k
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!