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.4k
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
Treasure_Hunting
solmetts
0
400
Mandalyn_DT5001_FinalAssignment.pdf
lynteo
0
220
Crisp Code inc.|ブランドガイドライン - Brand guidelines
so_kotani
1
360
タイル紹介サイト「タイルだもんで」
calpin
0
130
新卒2年目デザイナーが、UX検定基礎にチャレンジした話
designer_no_pon
1
1.4k
「ツール」から「パートナー」へ。AI伴走時代のUXデザインとは?~操作を減らし、成果を最大にするための設計~
ncdc
1
600
爆速開発でAIプロダクトが40万インプレッションになった話
tsubura
0
240
AI時代に必要な アイデアの形
uxman
0
170
Accelerating performance improvement based on a software review evaluation matrix
kitanosirokuma
0
220
はじめての演奏会フライヤーデザイン
chorkaichan
1
290
デザインを信じていますか
sekiguchiy
1
1.2k
20251128_武蔵野美術大学InnovationDay_参加型の未来
a2k
1
100
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
54k
Are puppies a ranking factor?
jonoalderson
1
3.3k
A designer walks into a library…
pauljervisheath
211
24k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
430
Speed Design
sergeychernyshev
33
1.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Invisible Side of Design
smashingmag
303
52k
How STYLIGHT went responsive
nonsquared
100
6.1k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
480
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!