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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jessica Stokes
September 09, 2015
Programming
360
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
61
Other Decks in Programming
See All in Programming
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
150
AI 時代のソフトウェア設計の学び方
masuda220
PRO
18
7.4k
iOS26時代の新規アプリ開発
yuukiw00w
0
200
要はバランスからの卒業 #yumemi_grow
kajitack
0
190
今さら聞けないCancellationToken
htkym
0
190
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
11
2.5k
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
120
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
730
AI時代になぜ書くのか
mutsumix
0
450
GitHub Copilot CLIのいいところ
htkym
2
1k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
6
1.6k
RTSPクライアントを自作してみた話
simotin13
0
120
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.8k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
570
How GitHub (no longer) Works
holman
316
150k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
280
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
370
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
380
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
230
Site-Speed That Sticks
csswizardry
13
1.2k
Music & Morning Musume
bryan
47
7.2k
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!