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.0)
Search
Jessica Stokes
August 05, 2015
Technology
0
54
Viewport Trickery (v1.0)
Putting responsive UIs atop desktop-only sites.
Presented at MelbMobile on 05/08/2015
Jessica Stokes
August 05, 2015
Tweet
Share
More Decks by Jessica Stokes
See All by Jessica Stokes
Viewport Trickery (v1.1)
ticky
0
330
Other Decks in Technology
See All in Technology
Spring Boot利用を前提としたJavaライブラリ開発方法の提案
kokihoshihara
PRO
2
140
今日から使える AWS Step Functions 小技集 / AWS Step Functions Tips
kinunori
7
650
なぜインフラコードのモジュール化は難しいのか - アプリケーションコードとの本質的な違いから考える
mizzy
46
12k
エンジニアにとってコードと並んで重要な「データ」のお話 - データが動くとコードが見える:関数型=データフロー入門
ismk
0
470
ステートレスなLLMでステートフルなAI agentを作る - YAPC::Fukuoka 2025
gfx
5
670
3年ぶりの re:Invent 今年の意気込みと前回の振り返り
kazzpapa3
0
200
CDKの魔法を少し解いてみる ― synth・build・diffで覗くIaCの裏側 ―
takahumi27
1
140
Flutter DevToolsで発見! 本番アプリのパフォーマンス問題と改善の実践
goto_tsl
1
380
こんな時代だからこそ! 想定しておきたいアクセスキー漏洩後のムーブ
takuyay0ne
4
550
やり方は一つだけじゃない、正解だけを目指さず寄り道やその先まで自分流に楽しむ趣味プログラミングの探求 2025-11-15 YAPC::Fukuoka
sugyan
1
430
Post-AIコーディング時代のエンジニア生存戦略
shinoyu
0
250
Lazy Constant - finalフィールドの遅延初期化
skrb
0
130
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Designing Experiences People Love
moore
142
24k
BBQ
matthewcrist
89
9.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Side Projects
sachag
455
43k
GraphQLとの向き合い方2022年版
quramy
49
14k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Transcript
Viewport Trickery or, putting responsive UIs atop desktop-only sites
Jessica Stokes Cybersorceress jessicastokes.net | @ticky
None
Photo by Patrick Lauke (CC-BY-NC-ND; Cropped) https://flic.kr/p/bTt6P8
Bugherd • 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!