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
Viewport Trickery (v1.1)
Search
Jessica Stokes
September 09, 2015
Programming
350
0
Share
Viewport Trickery (v1.1)
Putting responsive UIs atop desktop-only sites.
Presented at MelbJS on 09/09/2015
Jessica Stokes
September 09, 2015
More Decks by Jessica Stokes
See All by Jessica Stokes
Viewport Trickery (v1.0)
ticky
0
59
Other Decks in Programming
See All in Programming
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
230
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
170
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
420
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
7
1.2k
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
5.6k
アーキテクチャモダナイゼーションとは何か
nwiizo
14
3.2k
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
130
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
AI活用のコスパを最大化する方法
ochtum
0
370
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
950
Rethinking API Platform Filters
vinceamstoutz
0
8.3k
Nuxt Server Components
wattanx
0
240
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Become a Pro
speakerdeck
PRO
31
5.9k
Why Our Code Smells
bkeepers
PRO
340
58k
What's in a price? How to price your products and services
michaelherold
247
13k
The SEO identity crisis: Don't let AI make you average
varn
0
430
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Are puppies a ranking factor?
jonoalderson
1
3.2k
GraphQLとの向き合い方2022年版
quramy
50
14k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
Transcript
Viewport Trickery or, putting responsive UIs atop desktop-only sites v1.1
Jessica Stokes Cybersorceress jessicastokes.net | @ticky
None
Photo by Patrick Lauke (CC-BY-NC-ND; Cropped) https://flic.kr/p/bTt6P8
Bugherd • Point-and-click bug tracker • Lives inside other peoples’
websites • Needs to work on desktop and mobile sites • Responsive or not • On any device
Mobile browsers are liars! • …for kinda reasonable reasons •
position: fixed; // more-or-less useless on mobile
BugHerd Classic • Sidebar-based • Never handled mobile devices
None
New Bugherd • Simple layer over Stack, our task management
product • Just buttons and an issue report UI • Mobile-compatible, day 1
None
Solution? • Detect real zoom level and viewport position •
Scale and position the whole UI to suit
Viewporter • Tools for working with all sorts of browser
viewports • getScaleFactor getMobileScaleFactor for zoom detection • getViewportCoordinates for viewport location • Demo at https://macropodhq.github.io/viewporter https://github.com/macropodhq/viewporter | https://git.io/vOlJ9
PostCSS px to em • Makes your UI scalable •
Pixel measurements become ems • Base font size, 16px by default • Designers developers work in pixels for precision https://github.com/macropodhq/postcss-px-to-em | https://git.io/vOlUr
Jessica Stokes Cybersorceress jessicastokes.net | @ticky • Viewporter is available
at https://git.io/vOlJ9 • PostCSS px to em is available at https://git.io/vOlUr • Go make something cool with them!