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
360
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
61
Other Decks in Programming
See All in Programming
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
130
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
330
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
170
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.1k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
600
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
100
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
240
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
170
Featured
See All Featured
Designing for Performance
lara
611
70k
BBQ
matthewcrist
89
10k
The browser strikes back
jonoalderson
0
1.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
Designing for Timeless Needs
cassininazir
1
250
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Exploring anti-patterns in Rails
aemeredith
3
410
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
4 Signs Your Business is Dying
shpigford
187
22k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
290
A Soul's Torment
seathinner
6
2.9k
sira's awesome portfolio website redesign presentation
elsirapls
0
280
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!