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
Forefront Leeds - Andy Fitch - 18/11/2013
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
andyfitch
November 18, 2013
Programming
1
250
Forefront Leeds - Andy Fitch - 18/11/2013
A Mobile-first, OOCSS approach to Responsive Web Design
andyfitch
November 18, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
「ブロックテーマでは再現できない」は本当か?
inc2734
0
130
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
690
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
130
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
1
240
Automating Front-end Workflow
addyosmani
1371
200k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
47
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
It's Worth the Effort
3n
188
29k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
The Cult of Friendly URLs
andyhume
79
6.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Transcript
Andy Fitch @_andyfitch
Director Lead Front-end Developer @helloparallax
So what’s involved with running a digital agency?
None
• Summary of our development process ! ! • OOCSS
+ Responsive Web Design ! ! • Tools, tips & tricks for RWD & Retina
• 3 front-end developers ! • 3 back-end developers Andrew
Hathaway @andrewhathaway Daniel Le Page @dannylepage Jack Roscoe @northernintro James Hall @MrRio Aran Wilkinson @aran384 Nathaniel Higgins @nathggns
• Reduce code block ! ! • Medium - large
projects ! ! • Half front-end, half back-end
So what do front-end developers do?
HTML CSS Grunt Bower Compass CakePHP Inuit CSS JSON BEM
RWD MVC DRY SRP JavaScript SASS PHP jQuery Knockout RequireJS
Development Process at Parallax • Scoping / feasibility ! •
Wireframing ! • Design ! • Development
Wireframing • An iterative process with designers, right through to
development • Don’t be afraid of pen & paper!
Development
None
Development • Bower - package manager ! Search, install, update
& remove packages • Grunt - task manager ! Ditch CodeKit! • RequireJS - file and module loader ! Dependencies
Responsive Web Design Developers have a terrible habit of making
assumptions for their own convenience… ! …base your decisions on facts and evidence! All web design should be responsive Elastic?
Assumptions are toxic! DO NOT ASSUME mobile users only want
your primary content! ! Mobile users want the same information desktop users do, they just have different priorities
Assumptions are toxic! DO NOT ASSUME mobile users only want
your primary content! ! Mobile users want the same information desktop users do, they just have different priorities
DO NOT ASSUME anyone who is not using a desktop
is using an iPhone or an iPad. ! RWD stands for Responsive Web Design RWD does not stand for Reliable With Devices-made-by-Apple
DO NOT ASSUME your flashy retina users have flashy internet
connections! !
Planning! • Draw your layouts ! ! • Mobile first
• Schema ! ! • Framework
Implementation
Implementation yorkshireccc.com
• Abstracted code is lovely, generic, reusable code ! •
Objects ! • Rapid development ! • Helpers <div class=“media”> <div class=“media”> <div class=“media”> <div class=“media”> <div class=“media”> <div class=“media”> <div class=“media”> <div class=“media”> <div class=“media”> <div class=“media”>
Then Now
@media all and (min-width: 1000px) {
@media all and (min-width: 1000px) { @media all and (min-width:
768px) { @media all and (min-width: 600px) { @media all and (min-width: 420px) {
@media all and (min-width: 1000px) { @media all and (min-width:
768px) { @media all and (min-width: 600px) { @media all and (min-width: 420px) { Break points! not Device points
None
None
None
Single Responsibility Principle (SRP)! (each class has one job &
one job only) ! ! is completely at odds with ! ! Responsive Web Design! (many jobs at different states)
<div class=“grid”> <div class=“grid__item”> </div> <div class=“grid__item”> </div> <div class=“grid__item”>
</div> </div> A typical problem
<div class=“grid”> <div class=“grid__item one-whole soft-half—top soft-half--bottom”> </div> <div class=“grid__item
one-whole soft--top”> </div> <div class=“grid__item one-whole soft-half—bottom”> </div> </div>
.one-whole { width: 100%; } ! @media all and (min-width:
700px) { .one-whole { ! } } ! @media all and (min-width: 1000px) { .one-whole { } } <div class=“grid”> <div class=“grid__item one-whole soft-half—top soft-half--bottom”> </div> <div class=“grid__item one-whole soft--top”> </div> <div class=“grid__item one-whole soft-half—bottom”> </div> </div>
<div class=“grid grid--one-two-three”> <div class=“grid__item grid__item--primary soft-half--top soft-half--bottom”> </div> <div
class=“grid__item grid__item--secondary soft--top”> </div> <div class=“grid__item grid__item—tertiary soft-half--bottom”> </div> </div>
<div class=“grid grid--one-two-three”> <div class=“grid__item grid__item--primary soft-half--bottom”> </div> <div class=“grid__item
grid__item--secondary”> </div> <div class=“grid__item grid__item—tertiary”> </div> </div> .grid—one-two-three { .grid__item--primary { width: 100%; } .grid__item--secondary { width: 100%; } .grid__item--tertiary { width: 100%; } } @media all and (min-width: 700px) { .grid—one-two-three { .grid__item—primary { width: 66.6666%; } .grid__item—secondary { width: 33.3333%; } .grid__item--tertiary { width: 100%; } } } @media all and (min-width: 1000px) { .grid—one-two-three { .grid__item--primary { width: 50%; } .grid__item--secondary { width: 25%; } .grid__item--tertiary { width: 25%; } } }
.grid—one-two-three { .grid__item--primary { width: 100%; } .grid__item--secondary { width:
100%; } .grid__item--tertiary { width: 100%; } } @media all and (min-width: 700px) { .grid—one-two-three { .grid__item—primary { width: 66.6666%; } .grid__item—secondary { width: 33.3333%; } .grid__item--tertiary { width: 100%; } } } @media all and (min-width: 1000px) { .grid—one-two-three { .grid__item--primary { width: 50%; } .grid__item--secondary { width: 25%; } .grid__item--tertiary { width: 25%; } } } Mobile Tablet Desktop
.grid--one-two-two
Stack Similarities, Group Differences ! github.com/andyfitch/ssgd-rwd
• Define layouts in a top-level class • Comment your
code!! /yccc-skin/objects/_grids.scss /yccc-skin/responsive/_grids.scss
• Packery http://packery.metafizzy.co/ ! • Hammer.js http://eightmedia.github.io/hammer.js/ ! • cssarrowplease
http://cssarrowplease.com/ ! • FF Chartwell https://www.fontfont.com/how-to-use-ff-chartwell ! ! ! ! ! ! ! ! ! • Chosen http://harvesthq.github.io/chosen/ General
• * { box-sizing: border-box; } (IE8+) • http://www.paulirish.com/2012/box-sizing-border-box-ftw/ !
! • JSConsole - iOS Simulator & Android Debug Bridge • http://jsconsole.com/ ! ! • Flowtype • http://simplefocus.com/flowtype/ Responsive
• ImageOptim-CLI • https://github.com/JamieMason/ImageOptim-CLI ! • Compressive images • http://filamentgroup.com/lab/rwd_img_compression/
! • Retina Cookie trick • https://github.com/andyfitch/retina-cookie-trick ! • ReSRC.it • http://www.resrc.it/ ! • Current state of responsive images, srcset, src-N etc.: • http://html5doctor.com/responsive-images-end-of-year-report/ Retina
Andy Fitch @_andyfitch Thank you!