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
320
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
53
Other Decks in Programming
See All in Programming
2度もゼロから書き直して、やっとブラウザでぬるぬる動くAIに辿り着いた話
tomoino
0
160
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
11
1.8k
ktr0731/go-mcpでMCPサーバー作ってみた
takak2166
0
160
エラーって何種類あるの?
kajitack
5
150
Gleamという選択肢
comamoca
6
720
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
250
赤裸々に公開。 TSKaigiのオフシーズン
takezoux2
0
130
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
0
3k
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
490
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
110
Passkeys for Java Developers
ynojima
3
860
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
610
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
The World Runs on Bad Software
bkeepers
PRO
68
11k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Designing for humans not robots
tammielis
253
25k
We Have a Design System, Now What?
morganepeng
52
7.6k
Done Done
chrislema
184
16k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
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!