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
290
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
51
Other Decks in Programming
See All in Programming
命名をリントする
chiroruxx
1
610
Amazon Nova Reelの可能性
hideg
0
150
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
120
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
410
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
6
1.4k
ドメインイベント増えすぎ問題
h0r15h0
2
550
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
750
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
420
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
400
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
380
ErdMap: Thinking about a map for Rails applications
makicamel
1
110
GitHubで育つ コラボレーション文化 : ニフティでのインナーソース挑戦事例 - 2024-12-16 GitHub Universe 2024 Recap in ZOZO
niftycorp
PRO
0
1.3k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
170
14k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
How GitHub (no longer) Works
holman
312
140k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Building Your Own Lightsaber
phodgson
104
6.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Bash Introduction
62gerente
610
210k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Code Reviewing Like a Champion
maltzj
521
39k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
860
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!