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
0
340
Viewport Trickery (v1.1)
Putting responsive UIs atop desktop-only sites.
Presented at MelbJS on 09/09/2015
Jessica Stokes
September 09, 2015
Tweet
Share
More Decks by Jessica Stokes
See All by Jessica Stokes
Viewport Trickery (v1.0)
ticky
0
56
Other Decks in Programming
See All in Programming
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
Grafana:建立系統全知視角的捷徑
blueswen
0
280
ゆくKotlin くるRust
exoego
1
200
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
140
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.1k
Vibe codingでおすすめの言語と開発手法
uyuki234
0
180
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
630
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
330
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
660
CSC307 Lecture 05
javiergs
PRO
0
470
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
450
Patterns of Patterns
denyspoltorak
0
450
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
240
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
110
Designing Powerful Visuals for Engaging Learning
tmiket
0
200
Raft: Consensus for Rubyists
vanstee
141
7.3k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Automating Front-end Workflow
addyosmani
1371
200k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
190
Discover your Explorer Soul
emna__ayadi
2
1k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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!