5. RWD CHALLENGES
⢠many designers still think in terms of pixels
⢠traditional design software only supports static layouts
⢠confusion about whatâs appropriate for which tools
⢠where to start? start from scratch? use community theme?
⢠page bloat (multiple versions of images, tons of javascript
and css)
12. ASSUMPTIONS PERIOD:
.COM BUBBLE - IPHONE
http://nataliemilton.com/wp-content/uploads/2013/03/960px-900.png
⢠âThe web is just a page in a
browserâ
⢠DeďŹned design areas.
⢠Only needed one design
13. ⢠Mobile web browsing
⢠Separate, different experiences
for users.
⢠Need two designs
ASSUMPTIONS PERIOD:
IPHONE - IPAD
28. DESIGNING
IN PHOTOSHOP
⢠Static mockups donât translate into ďŹexible layouts
⢠Impractical to mockup inďŹnite number of layout variations
⢠DifďŹcult to communicate behavior, gestures, animations, etc.
30. DESIGNING
INTHE BROWSER
You lose details that might
not easily translate to the
browser!
⢠Not everyone is comfortable
coding
⢠Problematic to build what hasnât
been explicitly deďŹned
⢠Unknown factor: setting
expectations and client sign-off
are difďŹcult
46. ⢠Flexible Fluid Grid
⢠SASS or vanilla CSS
⢠CleanTemplates
PROS
drupal.org/project/zen
ZEN
⢠Very basic
⢠More time consuming
CONS
47. ⢠Fits your workďŹow
⢠You control the code
⢠Customized to ďŹt projects
PROS
CUSTOMTHEME
⢠Very time consuming to
build correctly
⢠No community support
CONS
49. COMBATTING
PAGE BLOAT
⢠Having a single code base with
RWD is a double-edged sword
⢠Common practice is to hide and
show device speciďŹc content
(display: none)
⢠Remember: mobile users expect
fast browsing experience
Browsers still download
hidden inline images!
51. ; Set the conditional stylesheets that are processed by IE.
stylesheets-conditional[lt IE 7][all][] = ie6-and-below.css
stylesheets-conditional[IE 9][all][] = ie9.css
stylesheets-conditional[IE][print][] = ie-print.css
drupal.org/project/conditional_styles
52. THE SOLUTION:
SEND LESS CODE!
+
⢠Conditional Stylesheets Module
⢠Modularize CSS with SASS &
Compass
⢠Load, ďŹre your JavaScript
conditionally (RequireJS,
EnquireJS, Modernizr)
53. THE SOLUTION:
SEND LESS CODE!
⢠Conditional Stylesheets Module
⢠Modularize CSS with SASS &
Compass
⢠Load, ďŹre your JavaScript
conditionally (RequireJS,
EnquireJS, Modernizr)
55. ⢠Images account for ~60% of
page weight
⢠Resolution independence is one
of the largest challenges facing
RWD
⢠Many techniques exist, browser
vendor solutions in-progress
(PictureďŹll, srcset)
Retina is here to stay.
IMAGES. IMAGES EVERYWHERE.
66. Â <span
 data-Ââpicture
 data-Ââalt="A
 giant
 stone
 face
 at
 The
 Bayon
 temple
 in
 Angkor
 Thom,
Â
Cambodia">
Â
Â
Â
Â
Â
Â
Â
 <span
 data-Ââsrc="small.jpg"></span>
Â
Â
Â
Â
Â
Â
Â
 <span
 data-Ââsrc="medium.jpg"
Â
Â
Â
Â
 data-Ââmedia="(min-Ââwidth:
 400px)"></span>
Â
Â
Â
Â
Â
Â
Â
 <span
 data-Ââsrc="large.jpg"
Â
Â
Â
Â
Â
 data-Ââmedia="(min-Ââwidth:
 800px)"></span>
Â
Â
Â
Â
Â
Â
Â
 <span
 data-Ââsrc="extralarge.jpg"
 data-Ââmedia="(min-Ââwidth:
 1000px)"></span>
Â
Â
Â
Â
Â
Â
Â
 <!-Ââ-Ââ
 Fallback
 content
 for
 non-ÂâJS
 browsers.
 Same
 img
 src
 as
 the
 initial,
Â
unqualified
 source
 element.
 -Ââ-Ââ>
Â
Â
Â
Â
Â
Â
Â
 <noscript>
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
 <img
 src="external/imgs/small.jpg"
 alt="A
 giant
 stone
 face
 at
 The
 Bayon
 temple
Â
in
 Angkor
 Thom,
 Cambodia">
Â
Â
Â
Â
Â
Â
Â
 </noscript>
Â
Â
Â
 </span>
PictureFill Module
future <picture> element today via JS
69. TAKEAWAYS
⢠think percentages, not pixels
⢠mockup in BOTH photoshop & browser, or use tool like ReďŹow
⢠code your own theme if experienced, have time, and need lots of
ďŹexibility
⢠otherwise use AdaptiveTheme, Omega, or Zen
⢠reduce page bloat with Compass, Sass., and conditional JS loading