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
Jessica Stokes
August 05, 2015
Technology
0
53
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
330
Other Decks in Technology
See All in Technology
自治体職員がガバクラの AWS 閉域ネットワークを理解するのにやって良かった個人検証環境
takeda_h
2
380
新卒(ほぼ)専業Kagglerという選択肢
nocchi1
1
2.2k
イオン店舗一覧ページのパフォーマンスチューニング事例 / Performance tuning example for AEON store list page
aeonpeople
2
270
歴代のWeb Speed Hackathonの出題から考えるデグレしないパフォーマンス改善
shuta13
6
600
実践アプリケーション設計 ①データモデルとドメインモデル
recruitengineers
PRO
2
200
mruby(PicoRuby)で ファミコン音楽を奏でる
kishima
1
220
広島発!スタートアップ開発の裏側
tsankyo
0
240
ソフトウェア エンジニアとしての 姿勢と心構え
recruitengineers
PRO
2
610
第4回 関東Kaggler会 [Training LLMs with Limited VRAM]
tascj
12
1.7k
LLMエージェント時代に適応した開発フロー
hiragram
1
410
モダンフロントエンド 開発研修
recruitengineers
PRO
2
260
マイクロモビリティシェアサービスを支える プラットフォームアーキテクチャ
grimoh
1
200
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
820
Producing Creativity
orderedlist
PRO
347
40k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
Bash Introduction
62gerente
614
210k
Building an army of robots
kneath
306
46k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
How STYLIGHT went responsive
nonsquared
100
5.7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
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!