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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jessica Stokes
August 05, 2015
Technology
0
58
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
340
Other Decks in Technology
See All in Technology
AWSの資格って役に立つの?
tk3fftk
2
370
Phase10_組織浸透_データ活用
overflowinc
0
500
Phase01_AI座学_基礎
overflowinc
0
1.3k
モジュラモノリス導入から4年間の総括:アーキテクチャと組織の相互作用について / Architecture and Organizational Interaction
nazonohito51
3
1.2k
Kiro Powers 入門
k_adachi_01
0
130
スピンアウト講座02_ファイル管理
overflowinc
0
400
TypeScript 7.0の現在地と備え方
uhyo
7
2k
めちゃくちゃ開発するQAエンジニアになって感じたメリットとこれからの課題感
ryuhei0000yamamoto
0
230
ソフトバンク流!プラットフォームエンジニアリング実現へのアプローチ
sbtechnight
1
230
OpenClaw を Amazon Lightsail で動かす理由
uechishingo
0
250
VPCエンドポイント意外とお金かかるなぁ。せや、共有したろ!
tommy0124
1
720
_Architecture_Modernization_から学ぶ現状理解から設計への道のり.pdf
satohjohn
2
590
Featured
See All Featured
Abbi's Birthday
coloredviolet
2
5.5k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
210
We Have a Design System, Now What?
morganepeng
55
8k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
410
Navigating Team Friction
lara
192
16k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Embracing the Ebb and Flow
colly
88
5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
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!