Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Viewport Trickery (v1.1)
Search
Jessica Stokes
September 09, 2015
Programming
380
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
64
Other Decks in Programming
See All in Programming
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
気持ちぃ〜角丸 Squircle
ryu1013
0
310
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
カツオ、ご期待ください
suneo3476
0
190
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
950
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
610
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
R8 の設定見直しでアプリサイズ削減
andpad
0
220
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
AmebaブログはKMPから卒業します
kmars0605
0
200
Event is what happens
moro
2
840
すこし踏み込む CancellationToken
htkym
2
1.7k
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
A Tale of Four Properties
chriscoyier
163
24k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
GraphQLとの向き合い方2022年版
quramy
50
15k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
560
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
KATA
mclloyd
PRO
35
16k
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!