Build Right: Build Responsively @ ConvergeSE

Build Right: Build Responsively @ ConvergeSE

The deck from our full day Build Right: Build Responsively workshop at ConvergeSE in Columbia, South Carolina, taught by @bencallahan and @jeremyloyd.

475203b37527b26e4fb2cc58e6e8493e?s=128

Build Right

May 01, 2014
Tweet

Transcript

  1. @bencallahan @jeremyloyd

  2. @hearsparkbox @brworkshop ! @bencallahan @jeremyloyd

  3. #brworkshop #convergese

  4. Collaborative note-taking: ! http://bit.ly/brworkshop-convergese-2014

  5. Why are J and I here?

  6. Why are you here?

  7. AN INTRODUCTION TO RESPONSIVE WEB DESIGN RWD 101

  8. September 9, 2007 6:30am

  9. 177% increase in tablet ownership since last year In the

    US... http://bit.ly/YFW4Ai
  10. 80% of consumers multi-task with other devices while watching TV

    In the US... http://bit.ly/YFW4Ai
  11. 26% of consumers own a laptop, tablet & smartphone http://bit.ly/YFW4Ai

    In the US...
  12. The web is not fixed width.

  13. The penetration of desktop & laptop ownership is the same

    today as it was in 2007. http://bit.ly/zE1zgp In the US...
  14. Mobile vs Desktop Browsing 0 500 1000 1500 2000 2007

    2008 2009 2010 2011 2012 2013 2014 2015 Mobile Users Desktop Users http://bit.ly/L5cqiO
  15. 0 500 1000 1500 2000 2007 2008 2009 2010 2011

    2012 2013 2014 2015 Mobile Users Desktop Users http://bit.ly/L5cqiO Happening now.
  16. Q1 2013 conversions on tablets surpassed conversions on traditional desktops

    http://bit.ly/sNpLte In the US...
  17. Flexibility is the new norm.

  18. People are trying to browse your sites on these devices,

    today.
  19. Responsive web design

  20. Ethan Marcotte ! Article on ALA (http://bit.ly/Wi0xvw) ! Book via

    ABA (http://bit.ly/f6TPB7)
  21. None
  22. RWD 101 ‣ Three Core Techniques - A Fluid Foundation

    - Flexible Content - Media Queries
  23. A Fluid Foundation Honor the proportions of the design by

    creating percentage-based layout instead of fixed-width, pixel-based layout.
  24. 1000px 400px 600px A Fluid Foundation

  25. 1000px 600px A Fluid Foundation

  26. 100% 40% 60% A Fluid Foundation

  27. 100% 40% 60% A Fluid Foundation

  28. Flexible Content Once we have a layout which is based

    on proportions, the content must also respond.
  29. We the People of the United States, in Order to

    form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defense, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America. Flexible Content
  30. We the People of the United States, in Order to

    form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defense, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain Flexible Content
  31. We the People of the United States, in Order to

    form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common (Image) 600px Flexible Content
  32. We the People of the United States, in Order to

    form a more perfect Union, (Image) 600px Flexible Content
  33. Flexible Content http://bit.ly/ZdC8pH We the People of the United States,

    in Order to form a more perfect Union, (Image) 600px
  34. We the People of the United States, in Order to

    form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defense, promote (Image) 100% Flexible Content
  35. Media Queries When our content and our design are no

    longer working in harmony, we need to make a larger shift in layout.
  36. Media Queries 100% 40% 60%

  37. A 100% C 100% B 100% C 40% B 60%

    A 100% Media Queries
  38. Media Queries A 100% C 100% B 100% C 40%

    B 60% A 100%
  39. RWD 101 ‣ Three Core Techniques - A Fluid Foundation

    - Flexible Content - Media Queries
  40. [live examples]

  41. [code example]

  42. EXERCISE

  43. Your Turn ‣ Code a simple responsive site using the

    three core RWD techniques ‣ Fluid Foundation ‣ Flexible Content ‣ Media Queries
  44. Your turn! 1 2 3 4 1 3 5 2

    4 6 5 1 4 2 5 6 3 6 ‣ Flexible Grid ‣ Images and Text ‣ Media Queries
  45. HOW RWD HAS CHANGED PROCESS RWD WORKFLOW

  46. We used to pretend like things were pretty simple.

  47. fixed width 1024ish 768ish

  48. DESIGN FRONT-END BACK-END LAUNCH! Linear Workflow THINK ABOUT 
 USERS

    THROW IN SOME CONTENT
  49. Slightly Better 
 Linear Workflow CONTENT UX DESIGN FRONT-END BACK-END

    LAUNCH!
  50. Why hello, RWD.

  51. Why hello, tiny browsers.

  52. Why hello, reality.

  53. THIS IS AWESOME, LET’S JUMP IN!

  54. Me too! Ditto! Old Linear Workflow Now with RWD! CONTENT

    UX DESIGN FRONT-END BACK-END LAUNCH!
  55. This doesn’t work.

  56. We need to invite others into the process.

  57. CONTENT UX FRONT-END DESIGN BACK-END “1 Deliverable” Workflow

  58. CONTENT UX FRONT-END DESIGN BACK-END “1 Deliverable” Workflow

  59. CONTENT UX FRONT-END DESIGN BACK-END “1 Deliverable” Workflow

  60. CONTENT UX FRONT-END DESIGN BACK-END “1 Deliverable” Workflow

  61. LAUNCH DESIGN FRONT END BACK END CONTENT DECISIONS MADE DECISIONS

    MADE DECISIONS MADE DECISIONS MADE CONTENT UX FRONT-END DESIGN BACK-END
  62. LAUNCH DESIGN FRONT END BACK END CONTENT DECISIONS MADE DECISIONS

    MADE DECISIONS MADE DECISIONS MADE CONTENT UX FRONT-END DESIGN BACK-END UX FRONT-END DESIGN LAUNCH DESIGN FRONT END BACK END CONTENT DECISIONS MADE DECISIONS MADE DECISIONS MADE DECISIONS MADE
  63. CONTENT UX Content, Planning & UX Tools

  64. Content & Planning ‣ Content Audit ‣ Information Architecture ‣

    Content Priority Guides ‣ Content Prototypes ‣ Static Wireframes ‣ Interactive Wireframes
  65. CONTENT & PLANNING Content Audit

  66. CONTENT & PLANNING Information Architecture

  67. CONTENT & PLANNING Content Priority Guides

  68. Write the Content

  69. CONTENT & PLANNING Content Prototypes

  70. CONTENT & PLANNING Static Wireframes

  71. CONTENT & PLANNING Interactive Wireframes

  72. FRONT-END DESIGN ND ! Design in the 
 “1 deliverable”

    workflow
  73. Dissecting Design PRODUCTIVITY TIME

  74. Dissecting Design PRODUCTIVITY TIME

  75. Dissecting Design PRODUCTIVITY TIME

  76. Establish the Aesthetic DISSECTING DESIGN

  77. Solve the Problem DISSECTING DESIGN

  78. Refine the Solution DISSECTING DESIGN

  79. None
  80. Establish the Aesthetic DISSECTING DESIGN

  81. DISSECTING DESIGN ‣ Style Comparisons ‣ Style Tiles ‣ Style

    Prototypes Establish the Aesthetic
  82. Style Comparisons ESTABLISH THE AESTHETIC “I could create an illustration

    or a 3D rendering of what I want my new office to look like, but that doesn’t take advantage of his great ideas. It’s dictation, not collaboration. Instead, I show him a Pinterest board my wife and I created.” ! @danielmall http://danielmall.com/articles/the-post-psd-era/
  83. Style Comparisons ESTABLISH THE AESTHETIC Light vs Dark

  84. Style Comparisons ESTABLISH THE AESTHETIC Flat vs Textured

  85. Style Comparisons ESTABLISH THE AESTHETIC Illustration vs Photography

  86. Style Tiles ESTABLISH THE AESTHETIC

  87. Style Tiles ESTABLISH THE AESTHETIC

  88. Style Tiles ESTABLISH THE AESTHETIC

  89. Style Prototypes ESTABLISH THE AESTHETIC

  90. USE TOOLS YOU ARE COMFORTABLE WITH TO ESTABLISH THE AESTHETIC

    HOW TO DECIDE
  91. Cool, so what  happens next?

  92. Solve the Problem DISSECTING DESIGN

  93. DISSECTING DESIGN ‣ Static Design Tools ‣ Responsive Design Tools

    ‣ HTML/CSS Solve the Problem
  94. Static Design Tools SOLVE THE PROBLEM

  95. Static Design Tools SOLVE THE PROBLEM

  96. Static Design Tools SOLVE THE PROBLEM

  97. Responsive Design Tools SOLVE THE PROBLEM

  98. SOLVE THE PROBLEM Responsive Design Tools

  99. SOLVE THE PROBLEM Responsive Design Tools

  100. HTML/CSS SOLVE THE PROBLEM

  101. HTML/CSS SOLVE THE PROBLEM

  102. HTML/CSS SOLVE THE PROBLEM

  103. Layout vs Modules SOLVE THE PROBLEM

  104. Layout vs Modules SOLVE THE PROBLEM

  105. SOLVE THE PROBLEM Atomic Design

  106. YOU BEST SOLVE PROBLEMS USING TOOLS YOU ARE FLUENT WITH

    HOW TO DECIDE
  107. Refine the Solution DISSECTING DESIGN

  108. DISSECTING DESIGN ‣ Static Design Tools ‣ Design Pairing Refine

    the Solution
  109. DISSECTING DESIGN Don’t Use Static Design Tools to Refine LAUNCH

    DESIGN FRONT END BACK END CONTENT DECISIONS MADE DECISIONS MADE DECISIONS MADE DECISIONS MADE
  110. Don’t Use Static Design Tools REFINE THE SOLUTION

  111. Instead of static design 
 hand-offs, consider
 design pairing REFINE

    THE SOLUTION
  112. Design Pairing REFINE THE SOLUTION

  113. Design Pairing REFINE THE SOLUTION

  114. You don’t want to do the long tail more than

    once REFINE THE SOLUTION
  115. EFFICIENCY IS KEY WHEN REFINING A DESIGN SOLUTION HOW TO

    DECIDE
  116. Establish ! Solve ! Refine ................. Comfort ! ....................... Fluency

    ! ................... Efficiency Guidelines for Selecting Tools
  117. An Example

  118. None
  119. None
  120. None
  121. None
  122. None
  123. None
  124. None
  125. None
  126. None
  127. EXERCISE

  128. Your Turn ‣ Sketch out your process ‣ Annotate it

    with things you think need to change ‣ Note where you might incorporate some of these new tools
  129. INVESTING IN PEOPLE INSTEAD OF PROCESS RESPONSIVE TEAMS

  130. Photo Credit: Jay Maisel

  131. Photo Credit: Jay Maisel

  132. Photo Credit: Jay Maisel

  133. Group improvisation is a challenge. Aside from the weighty technical

    problem of collective coherent thinking, there is the very human, even social need for sympathy from all members to bend for the common result. Bill Evans
  134. Group improvisation is a challenge. Aside from the weighty technical

    problem of collective coherent thinking, there is the very human, even social need for sympathy from all members to bend for the common result. Bill Evans The Problem of the Team
  135. Group improvisation is a challenge. Aside from the weighty technical

    problem of collective coherent thinking, there is the very human, even social need for sympathy from all members to bend for the common result. Bill Evans The Problem of the Individual
  136. Group Improvisation

  137. Individuals

  138. Group improvisation requires individuals on a team to... ! be

    fluent
  139. None
  140. SOLVE THE PROBLEM

  141. Unconscious Incompetence SOLVE THE PROBLEM

  142. Unconscious Incompetence Conscious Incompetence SOLVE THE PROBLEM

  143. Unconscious Incompetence Conscious Incompetence Conscious Competence SOLVE THE PROBLEM

  144. Unconscious Incompetence Conscious Incompetence Conscious Competence Unconscious Competence SOLVE THE

    PROBLEM
  145. Fluency SOLVE THE PROBLEM

  146. Group improvisation requires individuals on a team to... ! be

    humble
  147. None
  148. None
  149. “The Dip” keeps us humble.

  150. Group improvisation requires individuals on a team to... ! be

    empathetic
  151. Empathy is struggling with your teammates in areas where you

    are not fluent.
  152. Fluency Ignorance

  153. Ignorance User
 Experience User
 Interface Fluency Content CMS

  154. Ignorance User
 Experience User
 Interface Fluency Content CMS

  155. Ignorance User
 Experience User
 Interface Fluency Content CMS

  156. Ignorance User
 Experience User
 Interface Threshold of Empathy Fluency Content

    CMS
  157. Ignorance Content User
 Experience User
 Interface CMS Threshold of Empathy

    Fluency
  158. The Empathetic Web Maker Content User
 Experience User
 Interface CMS

    Gap Analysis
 Information Architecture Content Priority Wireframe
 Usability Test Heuristic Evaluation Visual Design
 Typography
 Illustration Content Modeling
 Management Workflow
 Content Governance Semantic Markup (HTML) Interaction Layer
 (JS) Style
 (CSS) Ruby
 PHP
 .NET Design Develop Empathy
  159. Fluency Humility Empathy

  160. Teams

  161. None
  162. None
  163. None
  164. None
  165. None
  166. None
  167. Create guidelines instead of rigid process

  168. The rigidity of your process should be inversely proportional to

    the level of fluency, humility, and empathy demonstrated by your team.
  169. Ability to
 improvise Fluency, humility, empathy demonstrated by team

  170. Inexperienced Experienced Rigid Process Group Improvisation • Missed deadlines •

    Blown budgets • Poor work • Frustrated team • Doubt in leadership • Good work • Meet deadlines • Sense that there’s a better way • Average work • Culture of trust • Regular innovation • Timeless work
  171. Inexperienced Experienced Rigid Process Group Improvisation • Missed deadlines •

    Blown budgets • Poor work • Frustrated team • Doubt in leadership • Good work • Meet deadlines • Sense that there’s a better way • Average work • Culture of trust • Regular innovation • Timeless work
  172. Inexperienced Experienced Rigid Process Group Improvisation • Missed deadlines •

    Blown budgets • Poor work • Frustrated team • Doubt in leadership • Good work • Meet deadlines • Sense that there’s a better way • Average work • Culture of trust • Regular innovation • Timeless work
  173. Create the perfect, fully-documented, all-encompassing web design and development process.

    ! Or...
  174. Chill out and develop our people.

  175. Invest in people over process

  176. EXERCISE

  177. Inexperienced Experienced Rigid Process Group Improvisation • Missed deadlines •

    Blown budgets • Trouble shipping • Frustrated team • Doubt in leadership • Good work • Meet deadlines • Sense that there’s a better way • Average work • Culture of trust • Regular innovation • Timeless work
  178. CODE AND PROJECT STRUCTURE SERVING RWD STYLES WE’LL START AT

    1:00
  179. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  180. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials CSS PREPROCESSING FTW!
  181. Before any of this stuff will work, you need to

    do this: <!-- html -->
 <meta name="viewport"
 content="width=device-width; 
 initial-scale=1.0;">
  182. And, you should also do this: ! /* CSS */"

    @-webkit-viewport { width:device-width; }" @-moz-viewport { width:device-width; }" @-ms-viewport { width:device-width; }" @-o-viewport { width:device-width; }" @viewport { width:device-width; }"
  183. 30% 50% 100% The Example

  184. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  185. Single CSS File HTML <link> CSS ! Start with styles

    
 applied to all ! Styles scoped to 
 a media query ! Styles scoped to 
 another media query
  186. Single CSS File /* styles.css */" ! aside { color:

    #333; width: 100%; }"
  187. Single CSS File /* styles.css */" ! aside { color:

    #333; width: 100%; }" ! /* if the viewport width is 40em or greater */"
  188. PAUSE: MEDIA QUERIES

  189. Media Queries <!-- In your HTML -->" ! <link media=”(min-width:

    30em)” ..." ! <link media=”screen and (max-width: 80em)” ..." ! ! ! /* In your CSS */" ! @media (min-width: 30em) { ... }" ! @media screen and (max-width: 80em) { ... }
  190. Media Types <!-- In your HTML -->" ! <link media=”(min-width:

    30em)” ..." ! <link media=”screen and (max-width: 80em)” ..." ! ! ! /* In your CSS */" ! @media (min-width: 30em) { ... }" ! @media screen and (max-width: 80em) { ... }
  191. Media Types all braille, embossed, speech handheld, projection, screen, tv

    print tty http://www.w3.org/TR/CSS21/media.html#media-types
  192. Media Features <!-- In your HTML -->" ! <link media=”(min-width:

    30em)” ..." ! <link media=”screen and (max-width: 80em)” ..." ! ! ! /* In your CSS */" ! @media (orientation: portrait) { ... }" ! @media screen and (color) { ... }
  193. Media Features width, height device-width, device-height orientation aspect-ratio, device-aspect-ratio color,

    color-index, monochrome resolution, scan, grid http://www.w3.org/TR/css3-mediaqueries
  194. Single CSS File HTML <link> CSS ! Start with styles

    
 applied to all ! Styles scoped to a
 media query ! Styles scoped to 
 another media query
  195. Small Viewport Width First HTML <link> CSS ! Smallest styles

    ! Wider styles (mq) ! Even wider styles (mq) ! Super wide styles (mq)
  196. Large Viewport Width First HTML <link> CSS ! Widest styles

    ! Wide styles (mq) ! Narrow styles (mq) ! Very narrow styles (mq)
  197. Single CSS File /* styles.css */" ! aside { color:

    #333; width: 100%; }" ! /* if the viewport width is 40em or greater */"
  198. Single CSS File /* styles.css */" ! aside { color:

    #333; width: 100%; }" ! /* if the viewport width is 40em or greater */" @media (min-width: 40em) {" aside { width: 50%; }" }"
  199. Single CSS File /* styles.css */" ! aside { color:

    #333; width: 100%; }" ! /* if the viewport width is 40em or greater */" @media (min-width: 40em) {" aside { width: 50%; }" }"
  200. Single CSS File /* styles.css */" ! aside { color:

    #333; width: 100%; }" ! /* if the viewport width is 40em or greater */" @media (min-width: 40em) {" aside { width: 50%; }" }" ! /* if the viewport width is 60em or greater */" @media (min-width: 60em) {" aside { width: 30%; }" }
  201. Single CSS File Small Viewport Width First /* styles.css */"

    ! aside { color: #333; width: 100%; }" ! /* if the viewport width is 40em or greater */" @media (min-width: 40em) {" aside { width: 50%; }" }" ! /* if the viewport width is 60em or greater */" @media (min-width: 60em) {" aside { width: 30%; }" }
  202. Single CSS File Large Viewport Width First /* styles.css */"

    ! aside { color: #333; width: 30%; }" ! /* if the viewport width is 60em or less */" @media (max-width: 60em) {" aside { width: 50%; }" }" ! /* if the viewport width is 40em or less */" @media (max-width: 40em) {" aside { width: 100%; }" }
  203. SERVING RWD STYLES Single CSS File ‣ Simple to implement

    ‣ Single request ‣ Doesn’t require a preprocessor ‣ Requires JS to serve large layout to old IE if starting with small layouts ‣ Large sites can be difficult to maintain because of the size of
 the single file
  204. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  205. Multiple CSS Files HTML <link> ! If this browser is

    less than IE9... and it’s not IE Mobile... and viewport width is at least 40em... <link> ! global.css ! all styles
 linear layout layout.css ! only styles for layout http://adactio.com/journal/4494/
  206. Multiple CSS Files index.html" ! <link href=”global.css” rel=”stylesheet”>" <link href=”layout.css”


    media=”(min-width: 40em)” 
 rel=”stylesheet”>" ! <!--[if (lt IE 9) & (!IEMobile)]>" <link href=”layout.css” rel=”stylesheet”>" <![endif]-->
  207. Multiple CSS Files index.html" ! <link href=”global.css” rel=”stylesheet”>" <link href=”layout.css”


    media=”(min-width: 40em)”
 rel=”stylesheet”>" ! <!--[if (lt IE 9) & (!IEMobile)]>" <link href=”layout.css” rel=”stylesheet”>" <![endif]-->
  208. Multiple CSS Files index.html" ! <link href=”global.css” rel=”stylesheet”>" <link href=”layout.css”


    media=”(min-width: 40em)” 
 rel=”stylesheet”>" ! <!--[if (lt IE 9) & (!IEMobile)]>" <link href=”layout.css” rel=”stylesheet”>" <![endif]-->
  209. Multiple CSS Files index.html" ! <link href=”global.css” rel=”stylesheet”>" <link href=”layout.css”


    media=”(min-width: 40em)”
 rel=”stylesheet”>" ! <!--[if (lt IE 9) & (!IEMobile)]>" <link href=”layout.css” rel=”stylesheet”>" <![endif]-->
  210. Multiple CSS Files index.html" ! <link href=”global.css” rel=”stylesheet”>" <link href=”layout.css”


    media=”(min-width: 40em)”
 rel=”stylesheet”>" ! <!--[if (lt IE 9) & (!IEMobile)]>" <link href=”layout.css” rel=”stylesheet”>" <![endif]-->
  211. Multiple CSS Files global.css" ! aside {" color: #333;" width:

    100%;" } layout.css" ! aside { width: 50%; }" ! @media (min-width: 60em) {" aside { width: 30%; }" }
  212. Multiple CSS Files global.css" ! aside {" color: #333;" width:

    100%;" } layout.css" ! aside { width: 50%; }" ! @media (min-width: 60em) {" aside { width: 30%; }" }
  213. SERVING RWD STYLES Multiple CSS Files ‣ Doesn’t require a

    preprocessor ‣ At least two requests ‣ Requires you to separate layout from other styles ‣ Allows you to start with small layouts and serve a single large layout to old IE without JS - Requests go up if you use multiple MQs
  214. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  215. Breakpoint Based Partials HTML <link> ! If this browser is

    less than IE9... and it’s not IE Mobile... <link> ! base.css ! all styles/MQ blocks no-mq.css ! MQ styles from base
 without the MQs http://nicolasgallagher.com/mobile-first-css-sass-and-ie/
  216. Breakpoint Based Partials index.html" ! <link href=”base.css” rel=”stylesheet”>" ! <!--[if

    (lt IE 9) & (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->
  217. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  218. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  219. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  220. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  221. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  222. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  223. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  224. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  225. PAUSE: CSS PREPROCESSORS

  226. styles.scss styles.css We write Sass
 (or LESS, Stylus, etc.) Browser

    gets CSS
 (like it always has) PREPROCESSING What is CSS Preprocessing?
  227. The Big Three: LESS, Sass, and Stylus

  228. LESS ‣ Runs on Node.js ‣ Very similar syntax to

    SASS ‣ http://lesscss.org/
  229. LESS syntax Variables are specified with @ symbol ! /*

    .less */" ! @top-variable: 20px;" ! " #header-shadow {" "position: absolute;" " " top: @top-variable;" " }
  230. Stylus ‣ Runs on Node.js ‣ Has a flexible syntax

    - You can omit semi-colons, colons, and braces ‣ http://learnboost.github.com/ stylus/
  231. Stylus Syntax /* .styl */" ! top-variable = 20px" "

    " #main-header" " position absolute" " " top top-variable" ! #footer {" " background: blue" " " border 1px solid #00f;" } Notice the terse, forgiving syntax.
  232. Sass ‣ Runs on Ruby ‣ Has two syntax flavors

    - .scss & .sass ‣ http://sass-lang.com/
  233. Sass Sytax $main-color: blue" ! /* .scss */" #main {"

    color: $main-color;" font-size: 0.3em;" }" ! /* .sass */" #main" color: $main-color" font-size: 0.3em
  234. What’s so cool about preprocessors, anyway?

  235. Nesting /* .css */" ! .food-list {" list-style: none;" }"

    ! .food-list li {" font-size: 1rem; " }" ! .food-list li a {" color: red;" }" ! /* .scss */" ! .food-list {" list-style: none;" li {" font-size: 1rem;" a {" color: red;" }" }" }
  236. Nesting can be abused. /* This is bad. Don’t do

    it. */" ! html body #main div.primary .big-header {" font-size: 2em;" } !
  237. Variables /*.scss*/" $white: rgba(255,255,255,1);" ! /*.less*/" @white: rgba(255,255,255,1);" ! /*.styl*/"

    white = rgba(255,255,255,1);" $black = rgba(0,0,0,1);
  238. Mixins /*.scss*/" ! @mixin border-radius( $value : 10px ) {"

    " -webkit-border-radius: $value;" " -moz-border-radius: $value;" " " " border-radius: $value;" } .btn{" @include border-radius(25px);" }
  239. Mixins ‣ Sass and Stylus both support basic programming like

    loops, if/else, etc. in mixins. ‣ LESS only offers “guarded mixins.” - I hear this is better with the *new* version...
  240. Sparkbox REM Mixin

  241. Sparkbox REM Mixin /*.scss*/" @include rem(padding, 0.5, 1, 4, 3);"

    @include rem(font-size, 1.2, large);
  242. Compass & Bourbon ‣ Compass and Bourbon are mixin libraries

    for Sass ‣ Takes care of vendor prefixes with mixins ‣ Compass has an ecosystem of plugins built on top of Compass ‣ With config.rb, Compass lets you check the preprocessor config into source control
  243. Compass & Bourbon

  244. Importing ‣ Allows you to break up your styles across

    files - variables, mixins, reset, all separated ‣ Better than a standard css import
  245. Importing this file will compile to base.css /* base.scss */"

    ! @import "compass";" @import "variables";" @import "reset";" @import "mixins";" @import "header";" @import "hero";" @import "whatever";
  246. CSS PREPROCESSORS Resources Codekit http://incident57.com/codekit/

  247. CSS PREPROCESSORS Resources Scout http://mhs.github.com/scout-app/

  248. CSS PREPROCESSORS Resources Compass http://compass-style.org/

  249. CSS PREPROCESSORS Resources Sass Primer http://thesassway.com/beginner/getting- started-with-sass-and-compass

  250. Breakpoint Based Partials base.css" ! aside { color: #333; width:

    100%; }" @media (min-width: 40em) {" aside { width: 50%; }" }" @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { width: 50%; }" aside { width: 30%; }
  251. _40em.scss" ! aside { width: 50%; } Breakpoint Based Partials

    base.scss" ! @import “smallest”;" @media (min-width: 40em) {" @import “40em”;" }" @media (min-width: 60em) {" @import “60em”;" } no-mq.scss" ! @import “40em”;" @import “60em”; _60em.scss" ! aside { width: 30%; } _smallest.scss" ! aside { color: #333;
 width: 100%;}
  252. SERVING RWD STYLES Breakpoint Based Partials ‣ Allows you to

    start with small layouts and serve large layout to old IE without JS ‣ Only 1 or 2 requests ‣ Requires preprocessor ‣ Maintenance can be complex
  253. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  254. HTML If < IE9 and not IE Mobile <link> !

    If >= IE9 or IE Mobile or not IE <link> Module Based Partials no-mq.css ! All styles with no MQs ! ! mq.css ! All styles with MQs http://seesparkbox.com/foundry/ structuring_and_serving_styles_for_older_browsers
  255. Module Based Partials index.html" ! <!--[if (lt IE 9) &

    (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->" ! <!--[if (gte IE 9) | (IEMobile)]><!-->" <link href=”mq.css” rel=”stylesheet”>" <!--<![endif]-->
  256. Module Based Partials index.html" ! <!--[if (lt IE 9) &

    (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->" ! <!--[if (gte IE 9) | (IEMobile)]><!-->" <link href=”mq.css” rel=”stylesheet”>" <!--<![endif]-->
  257. Module Based Partials index.html" ! <!--[if (lt IE 9) &

    (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->" ! <!--[if (gte IE 9) | (IEMobile)]><!-->" <link href=”mq.css” rel=”stylesheet”>" <!--<![endif]-->
  258. Module Based Partials index.html" ! <!--[if (lt IE 9) &

    (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->" ! <!--[if (gte IE 9) | (IEMobile)]><!-->" <link href=”mq.css” rel=”stylesheet”>" <!--<![endif]-->
  259. Module Based Partials index.html" ! <!--[if (lt IE 9) &

    (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->" ! <!--[if (gte IE 9) | (IEMobile)]><!-->" <link href=”mq.css” rel=”stylesheet”>" <!--<![endif]-->
  260. Module Based Partials index.html" ! <!--[if (lt IE 9) &

    (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->" ! <!--[if (gte IE 9) | (IEMobile)]><!-->" <link href=”mq.css” rel=”stylesheet”>" <!--<![endif]-->
  261. Module Based Partials mq.css" ! aside { color: #333;
 width:

    100%; }" ! @media (min-width: 40em) {" aside { width: 50%; }" }" ! @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { color: #333;
 width: 100%;" width: 50%;" width: 30%; }
  262. Module Based Partials mq.css" ! aside { color: #333;
 width:

    100%; }" ! @media (min-width: 40em) {" aside { width: 50%; }" }" ! @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { color: #333;
 width: 100%;" width: 50%;" width: 30%; }
  263. Module Based Partials mq.css" ! aside { color: #333;
 width:

    100%; }" ! @media (min-width: 40em) {" aside { width: 50%; }" }" ! @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { color: #333;
 width: 100%;" width: 50%;" width: 30%; }
  264. Module Based Partials mq.css" ! aside { color: #333;
 width:

    100%; }" ! @media (min-width: 40em) {" aside { width: 50%; }" }" ! @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { color: #333;
 width: 100%;" width: 50%;" width: 30%; }
  265. Module Based Partials mq.css" ! aside { color: #333;
 width:

    100%; }" ! @media (min-width: 40em) {" aside { width: 50%; }" }" ! @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { color: #333;
 width: 100%;" width: 50%;" width: 30%; }
  266. Module Based Partials mq.css" ! aside { color: #333;
 width:

    100%; }" ! @media (min-width: 40em) {" aside { width: 50%; }" }" ! @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { color: #333;
 width: 100%;" width: 50%;" width: 30%; }
  267. Module Based Partials mq.css" ! aside { color: #333;
 width:

    100%; }" ! @media (min-width: 40em) {" aside { width: 50%; }" }" ! @media (min-width: 60em) {" aside { width: 30%; }" } no-mq.css" ! aside { color: #333;
 width: 100%;" width: 50%;" width: 30%; }
  268. Module Based Partials mq.scss" ! @import “compass”;" @import “sb-media”;" !

    @import “aside”;" @import “nav”;" @import “footer”;" ... no-mq.scss" ! @import “compass”;" @import “sb-media”;" ! $sb-no-mq-support: true;" ! @import “aside”;" @import “nav”;" @import “footer”;" ...
  269. Module Based Partials mq.scss" ! @import “compass”;" @import “sb-media”;" !

    @import “aside”;" @import “nav”;" @import “footer”;" ... no-mq.scss" ! @import “compass”;" @import “sb-media”;" ! $sb-no-mq-support: true;" ! @import “aside”;" @import “nav”;" @import “footer”;" ...
  270. Module Based Partials mq.scss" ! @import “compass”;" @import “sb-media”;" !

    @import “aside”;" @import “nav”;" @import “footer”;" ... no-mq.scss" ! @import “compass”;" @import “sb-media”;" ! $sb-no-mq-support: true;" ! @import “aside”;" @import “nav”;" @import “footer”;" ...
  271. Module Based Partials mq.scss" ! @import “compass”;" @import “sb-media”;" !

    @import “aside”;" @import “nav”;" @import “footer”;" ... no-mq.scss" ! @import “compass”;" @import “sb-media”;" ! $sb-no-mq-support: true;" ! @import “aside”;" @import “nav”;" @import “footer”;" ...
  272. Module Based Partials _aside.scss" ! ! aside {" color: #333;

    width: 100%;" ! @include sb-media(40em) {" width: 50%; }" ! @include sb-media(60em) {" width: 30%; }" }
  273. Module Based Partials _aside.scss" ! ! aside {" color: #333;

    width: 100%;" ! @include sb-media(40em) {" width: 50%; }" ! @include sb-media(60em) {" width: 30%; }" }
  274. Module Based Partials _aside.scss" ! ! aside {" color: #333;

    width: 100%;" ! @include sb-media(40em) {" width: 50%; }" ! @include sb-media(60em) {" width: 30%; }" } $sb-no-mq-support: true; aside { color: #333;
 width: 100%;" width: 50%;" width: 30%; }
  275. Module Based Partials $no-mq-support: false !default;" $serve-to-nomq-max-width:60em;" ! @mixin sb-media($query)

    {" @if $no-mq-support{" @if $query < $serve-to-nomq-max-width {" @content;" }" } @else {" @media ( 'min-width:' + $query ) {" @content;" }" }" }" https://github.com/sparkbox/SB-Media
  276. https://github.com/sparkbox/SB-Media

  277. https://github.com/Team-Sass/breakpoint

  278. SERVING RWD STYLES Module Based Partials ‣ Single Request ‣

    Easy Maintenance ‣ Allows you to start with small layouts and serve large layout to old IE without JS ‣ Requires Preprocessor
  279. This is so much more natural.

  280. THERE IS NO
 BREAKPOINT

  281. There is no Breakpoint aside {" // general styles" !

    // major shift at 40em" // major shift at 60em" ..." } aside {" // general styles" ! // major shift at 40em" // minor tweak at 42em" // minor tweak at 53.5em" // minor tweak at 56em" // major shift at 60em" // minor tweak at 72.2em" // minor tweak at 74em" ..." }
  282. There is no Breakpoint aside {" // general styles" !

    // major shift at 40em" // major shift at 60em" ..." } aside {" // general styles" ! // major shift at 40em" // minor tweak at 42em" // minor tweak at 53.5em" // minor tweak at 56em" // major shift at 60em" // minor tweak at 72.2em" // minor tweak at 74em" ..." }
  283. There is no Breakpoint Media Query Bookmarklet
 (by @robtarr)

  284. There is no Breakpoint

  285. Relax.

  286. Think more modularly. ! Try something like SMACSS (from @snookca).

  287. Element Queries http://www.xanthir.com/b4PR0

  288. Responsive Elements https://github.com/kumailht/responsive-elements

  289. http://seesparkbox.com/foundry/there_is_no_breakpoint There is no Breakpoint http://www.markboulton.co.uk/journal/theinbetween The In-Between http://www.jordanm.co.uk/post/43147197731/the-in-between The

    In-Between (2)
  290. An Example

  291. EXERCISE

  292. Your Turn ‣ Modify your simple RWD experiment to use

    the sb-media mixin. ‣ https://github.com/sparkbox/SB-Media
  293. MAKING EVERYTHING FLUID CREATING
 FLEXIBILITY

  294. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  295. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  296. It starts with the grid

  297. It starts with the grid body {" width: 100%;" }"

    ! div.main {" width: 70%;" }" ! aside {" width: 28%;" } body {" width: 1000px;" }" ! div.main {" width: 700px;" }" ! aside {" width: 280px;" }
  298. It starts with the grid body {" width: 100%;" }"

    ! div.main {" width: 70%;" } target / context = % 700 / 1000 = .7 .7 = 70% body {" width: 1000px;" }" ! div.main {" width: 700px;" }
  299. It starts with the grid body {" width: 100%;" }"

    ! aside {" width: 28%;" } target / context = % 280 / 1000 = .28 .28 = 28% body {" width: 1000px;" }" ! aside {" width: 280px;" }
  300. Responsive grid systems

  301. CREATING FLEXIBILITY RWD Grid Systems ‣ Foundation ‣ Bootstrap ‣

    Skeleton ‣ Responsive.gs ‣ Columnal ‣ ...this list goes on, and on, and on
  302. CREATING FLEXIBILITY Semantic RWD Grid Systems ‣ Semantic.gs ‣ Susy

    ‣ Zen Grids
  303. Semantic.gs @column-width: 60;" @gutter-width: 20;" @columns: 12;" @total-width: 100%;" !

    header { @include column(12); }" article { @include column(12); }" aside { @include column(12); }" ! @media (min-width: 38em) {" article { @include column(8); }" aside { @include column(4); }" }
  304. Semantic.gs @column-width: 60;" @gutter-width: 20;" @columns: 12;" @total-width: 100%;" !

    header { @include column(12); }" article { @include column(12); }" aside { @include column(12); }" ! @media (min-width: 38em) {" article { @include column(8); }" aside { @include column(4); }" }
  305. Semantic.gs @column-width: 60;" @gutter-width: 20;" @columns: 12;" @total-width: 100%;" !

    header { @include column(12); }" article { @include column(12); }" aside { @include column(12); }" ! @media (min-width: 38em) {" article { @include column(8); }" aside { @include column(4); }" }
  306. Semantic.gs @column-width: 60;" @gutter-width: 20;" @columns: 12;" @total-width: 100%;" !

    header { @include column(12); }" article { @include column(12); }" aside { @include column(12); }" ! @media (min-width: 38em) {" article { @include column(8); }" aside { @include column(4); }" }
  307. Semantic.gs @column-width: 60;" @gutter-width: 20;" @columns: 12;" @total-width: 100%;" !

    header { @include column(12); }" article { @include column(12); }" aside { @include column(12); }" ! @media (min-width: 38em) {" article { @include column(8); }" aside { @include column(4); }" }
  308. Or, just roll your own

  309. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  310. CREATING FLEXIBILITY Responsive Layout Patterns ‣ Source order stacking ‣

    Content choreography ‣ Off canvas
  311. CREATING FLEXIBILITY Responsive Layout Patterns ‣ Source order stacking ‣

    Content choreography ‣ Off canvas
  312. HEADER HEADER CONTENT 1 CONTENT 1 CONTENT 2 CONTENT 2

    AD SEARCH SEARCH AD FOOTER Large Resolution Small Resolution
  313. HEADER HEADER CONTENT 1 CONTENT 1 CONTENT 2 CONTENT 2

    AD SEARCH SEARCH AD FOOTER Large Resolution Small Resolution
  314. CREATING FLEXIBILITY Responsive Layout Patterns ‣ Source order stacking ‣

    Content choreography ‣ Off canvas
  315. None
  316. None
  317. appendAround JS Library https://github.com/filamentgroup/AppendAround $( “.move-me" ).appendAround();

  318. <!-- initial container for appendAround -->" <div class=“cont-1” data-set="containers">" <p

    class=“move-me”>appendAround content</p>" </div> " ! <div>" <p>Some other content</p>" </div>" ! <!-- potential container for appendAround -->" <div class=“cont-2" data-set="containers"></div>" ! <div>" <p>Some other content</p>" </div>" ! <!-- potential container for appendAround -->" <div class=“cont-3" data-set="containers"></div>
  319. .cont-1 { display: block; }" .cont-2, .cont-3 { display: none;

    }" ! @media (min-width: 30em) {" .cont-2 { display: block; }" .cont-1, .cont-3 { display: none; }" }" ! @media (min-width: 50em) {" .cont-3 { display: block; }" .cont-1, .cont-2 { display: none; }" }
  320. CREATING FLEXIBILITY Responsive Layout Patterns ‣ Source order stacking ‣

    Content choreography ‣ Off canvas
  321. HEADER CONTENT 1 CONTENT 2 RELATED CONTENT POPULAR CONTENT SUB

    NAV AD Large Resolution
  322. CONTENT 1 NAVIGATION RELATED CON POPULAR CON AD NAV EXTRA

    HEADER
  323. Off Canvas

  324. Easiest to show
 a few examples:
 http://jasonweaver.name/lab/offcanvas/ ! http://disney.com/ !

    http://www.lenovo.com/au/en/
  325. There are many, many combinations of these basic ideas !

    http://bit.ly/U4N5qH ! (http://bradfrost.github.com/this-is-responsive/patterns.html)
  326. There are some really cool new layout modules coming...

  327. http://www.netmagazine.com/tutorials/ master-new-css-layout-properties

  328. http://www.fivesimplesteps.com/ products/css3-layout-modules

  329. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  330. Type flexes by default

  331. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

    ‣ Consider contrast ‣ Spacing and Hierarchy ‣ Type sizing ‣ Line length ‣ Line breaks
  332. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

    ‣ Consider contrast ‣ Spacing and Hierarchy ‣ Type sizing ‣ Line length ‣ Line breaks
  333. None
  334. None
  335. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

    ‣ Consider contrast ‣ Spacing and Hierarchy ‣ Type sizing ‣ Line length ‣ Line breaks
  336. @snookca http://snook.ca/technical/colour_contrast/colour.html

  337. @leaverou http://leaverou.github.com/contrast-ratio/

  338. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

    ‣ Consider contrast ‣ Spacing and Hierarchy ‣ Type sizing ‣ Line length ‣ Line breaks
  339. None
  340. None
  341. Type Considerations ‣ Type size/line height relationship Rule of thumb:

    Line height 140% of body size
  342. Type Considerations ‣ Spacing: Grouping information Associate subheads with content

    by proximity
  343. Type Considerations ‣ Spacing: Allow the content to breathe

  344. Type Considerations ‣ Spacing: Margin after paragraphs Rule of thumb:

    About half of the 
 line height
  345. Maintaining Hierarchy ‣ Size ‣ Weight ‣ Color ‣ Position

    ‣ Type Contrast
  346. Maintaining Hierarchy

  347. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

    ‣ Consider contrast ‣ Spacing and Heirarchy ‣ Type sizing ‣ Line length ‣ Line breaks
  348. @mixin rem( $property, $a:0, $b:$a, $c:$a, $d:$b ) {" @if

    ( $property == "font-size" ) {" // $a is the font size" // %b is the keyword" @if ( $a != $b ) {" font-size: $b;" }" @else {" font-size: $a * $base-font-multiplier * 16px;" }" font-size: $a * 1rem;" } @else {" $apx: $a * $base-font-multiplier * 16px;" $bpx: $b * $base-font-multiplier * 16px;" $cpx: $c * $base-font-multiplier * 16px;" $dpx: $d * $base-font-multiplier * 16px;" $arem: $a * 1rem;" $brem: $b * 1rem;" $crem: $c * 1rem;" $drem: $d * 1rem;" ! @if ( $property == "padding" or $property == "margin" ){" #{$property}: $apx $bpx $cpx $dpx;" REM Mixin
  349. vw & vh CSS Units

  350. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

    ‣ Consider contrast ‣ Spacing and Heirarchy ‣ Type sizing ‣ Line length ‣ Line breaks
  351. Type Considerations ‣ Line Length Rule of thumb: 45–70 characters

    
 per line
  352. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

    ‣ Consider contrast ‣ Spacing and Heirarchy ‣ Type sizing ‣ Line length ‣ Line breaks
  353. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  354. Flexible Images img {" max-width: 100%;" }

  355. The image problem(s)

  356. CREATING FLEXIBILITY The image problem(s) ‣ Content ‣ Bandwidth ‣

    Pixel density
  357. CREATING FLEXIBILITY Image: Content

  358. CREATING FLEXIBILITY Image: Content

  359. CREATING FLEXIBILITY Image: Content

  360. CREATING FLEXIBILITY Image: Content

  361. CREATING FLEXIBILITY Image: Bandwidth As of March of 2012, 86%

    of the sites on mediaqueri.es demonstrated the same weight and load time at resolutions from 300ish to 1200ish. ! via @guypod http://www.guypo.com/mobile/performance-implications-of-responsive- design-book-contribution/
  362. CREATING FLEXIBILITY Image: Bandwidth Responsive & Responsible ! via @scotjehl

    https://speakerdeck.com/scottjehl/responsive-responsible http://www.lukew.com/ff/entry.asp?1565
  363. CREATING FLEXIBILITY Image: Pixel Density Most new mobile devices have

    high pixel density displays: ! Apple iPhone 4+: 326 PPI Amazon Kindle Fire HD 8.9: 254 PPI Nokia Lumia 920: 332 PPI BlackBerry Z10: 356 PPI Samsung Galaxy Note: 285 PPI
  364. CREATING FLEXIBILITY The image problem(s) ‣ Content ‣ Bandwidth ‣

    Pixel density
  365. The image solution(s)

  366. CREATING FLEXIBILITY The image solution(s) ‣ SVG ‣ Icon fonts

    ‣ Pixel-density media queries ‣ Compressive ‣ New markup ‣ Intercepting requests ‣ User preference
  367. SVG (Scalable Vector Graphics) ‣ Allows the image to be

    resolution independent. ‣ Support isn’t very good for older browsers. ‣ We can use Modernizr to detect if the browser supports SVG and provide a .png fallback for those that do not.
  368. @dbushell wrote a great primer for SVG

  369. Icon Fonts ‣ Fonts by default are resolution independent, Icon

    fonts are no different. ‣ http://icomoon.io/app/ allows you to create your own icon fonts ‣ They do require a bit more markup, and JS for IE 7 and lower.
  370. Icon Font Markup /*.scss*/" [data-icon]:before {" content: attr(data-icon);" font-family: 'icon-font-family';"

    speak: none;" } <!--html-->" <a href="#" class="search-toggle">" <span aria-hidden="true" 
 data-icon="&#xe009;"></span>" <span class="screen-reader">Search</span>" </a>
  371. Compressive Images ‣ http://bit.ly/Sygdey ‣ Increase the image dimensions ‣

    Add massive compression ‣ Scale the image in the browser
  372. Pixel Density MQs ‣ Detect the pixel ratio of the

    device and serve a second, higher-res image. ‣ Retina devices now have to make an additional request for the retina asset.
  373. Pixel Density MQs Also need other browser prefixes /*.scss*/" @media

    only all and
 (-webkit-min-device-pixel-ratio: 1.5) {" .logo {" background-image: url(/i/logo-2x.png);" background-size: 100%;" }" }
  374. New Markup ‣ http://responsiveimages.org/ ! ‣ Picture - http://picture.responsiveimages.org/ ‣

    Srcset - http://www.w3.org/html/wg/drafts/srcset/ w3c-srcset/
  375. Picture Polyfill

  376. Srcset Polyfill

  377. Intercepting Requests ‣ As a service (via url prefix) -

    http://resrc.it ! ‣ On your server (via .htaccess) - http://adaptive-images.com/
  378. User Preference ‣ Allow the user to choose what experience

    they would like to have on their device: “HD” or “SD”.
  379. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  380. CREATING FLEXIBILITY Tables http://jsbin.com/emexa4

  381. CREATING FLEXIBILITY Tables http://codepen.io/aarongustafson/pen/ucJGv

  382. CREATING FLEXIBILITY Tables http://filamentgroup.com/examples/rwd-table-patterns/

  383. CREATING FLEXIBILITY Tables http://codepen.io/bencallahan/pen/xvmCe

  384. RWD Table Patterns [demo]

  385. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  386. CREATING FLEXIBILITY Video

  387. CREATING FLEXIBILITY Intrinsic Ratios http://codepen.io/bencallahan/pen/KICkl

  388. CREATING FLEXIBILITY Video

  389. Creating flexibility requires experimentation

  390. Discussion ‣ What content types have we not addressed? ‣

    What specific challenges are you facing in creating flexibility?
  391. UNIQUE CONSIDERATIONS AND CHALLENGES RWD NAVIGATION

  392. The Maze

  393. amazon.com

  394. amazon.com

  395. amazon.com

  396. amazon.com

  397. amazon.com

  398. amazon.com

  399. Congratulations! In celebration of all your hard work and discipline,

    as a reward for all the risk you’ve taken to reach this point, we’re quite pleased to present you with…YOUR CONTENT! ! Keep up the good work! ! ~ The Management
  400. A Taxonomy ‣ Trigger Indicators ‣ Trigger (reveal) Patterns !

    ‣ Interaction Indicators ‣ Interaction Patterns
  401. Trigger Indicators

  402. What is a Trigger?

  403. Trigger Indicators ‣ Words ‣ menu, main menu ‣ nav,

    navigation ‣ site specific
 (sections, topics,
 products, etc.) ‣ Icons ‣ plus ‣ hamburger ‣ arrows ‣ “x”
  404. TRIGGER INDICATORS Words

  405. TRIGGER INDICATORS Icons Plus Hamburger Down Arrow

  406. TRIGGER INDICATORS Other & Combinations

  407. Trigger Indicators ‣ Words ‣ menu, main menu ‣ nav,

    navigation ‣ site specific
 (sections, topics,
 products, etc.) ‣ Icons ‣ plus ‣ hamburger ‣ arrows ‣ “x”
  408. Trigger Patterns
 (or, Reveal Patterns)

  409. Trigger Patterns ‣ Always Available ‣ Anchor to Footer ‣

    Select Element ‣ Make Room ‣ Cover Up ‣ Off Canvas ‣ Priority + ‣ Full Screen Takeover
  410. TRIGGER PATTERNS: ALWAYS AVAILABLE

  411. TRIGGER PATTERNS: ANCHOR TO FOOTER

  412. TRIGGER PATTERNS: SELECT ELEMENT

  413. iOS 7 TRIGGER PATTERNS: SELECT ELEMENT

  414. TRIGGER PATTERNS: SELECT ELEMENT Chrome on OS X

  415. TRIGGER PATTERNS: MAKE ROOM

  416. TRIGGER PATTERNS: COVER UP

  417. TRIGGER PATTERNS: OFF CANVAS

  418. TRIGGER PATTERNS: PRIORITY +

  419. TRIGGER PATTERNS: FULL SCREEN TAKEOVER

  420. Trigger Patterns ‣ Always Available ‣ Anchor to Footer ‣

    Select Element ‣ Make Room ‣ Cover Up ‣ Off Canvas ‣ Priority + ‣ Full Screen Takeover
  421. Interaction Indicators

  422. INTERACTION INDICATORS Icons

  423. Interaction Indicators ‣ Icons ‣ plus ‣ dash ‣ “x”

    ‣ various arrows
  424. Interaction Patterns

  425. Interaction Patterns ‣ List ‣ Accordion ‣ Paging

  426. INTERACTION PATTERNS: LIST

  427. INTERACTION PATTERNS: ACCORDION

  428. INTERACTION PATTERNS: PAGING

  429. Interaction Patterns ‣ List ‣ Accordion ‣ Paging

  430. Takeaways

  431. Takeaways ‣ Architecture ‣ Focus ‣ Behavior ‣ JavaScript ‣

    Usability
  432. TAKEAWAYS: ARCHITECTURE

  433. TAKEAWAYS: ARCHITECTURE

  434. TAKEAWAYS: FOCUS

  435. TAKEAWAYS: BEHAVIOR Multi Open

  436. TAKEAWAYS: BEHAVIOR Single Open

  437. TAKEAWAYS: BEHAVIOR Single Open

  438. Auto Scroll TAKEAWAYS: BEHAVIOR

  439. Takeaways ‣ JavaScript ‣ Visible by Default ‣ Anchor to

    Footer ‣ Single DOM
  440. mediaCheck, by @robtarr

  441. Takeaways ‣ Usability ‣ User Expectations ‣ Plan for the

    Worst ‣ Teach Use
  442. Live Examples

  443. Discussion ‣ How are you handling navigation in your RWD

    projects? ‣ Have you been able to push back on IA?
  444. LEARN FROM OUR MISTAKES LESSONS LEARNED

  445. Testing

  446. LESSONS LEARNED Testing ‣ You must test on real devices

    ‣ Do your development in a webkit browser ‣ Build libraries of your patterns
  447. Pricing

  448. LESSONS LEARNED Pricing ‣ As much as 100% more, initially

    ‣ Likely to be 50% more, soon after ‣ Probably never less than 25% more
  449. LESSONS LEARNED Pricing ‣ As much as 100% more, initially

    ‣ Likely to be 50% more, soon after ‣ Probably never less than 25% more COMPARED TO WHAT?
  450. LESSONS LEARNED Pricing ‣ Testing (labs & time) ‣ Fewer

    patterns ‣ Project management ‣ Learning curve ‣ Maintenance ‣ Content strategy
  451. Prioritization

  452. LESSONS LEARNED Prioritization

  453. LESSONS LEARNED Prioritization

  454. LESSONS LEARNED Prioritization

  455. LESSONS LEARNED Prioritization

  456. LESSONS LEARNED Prioritization

  457. Performance

  458. LESSONS LEARNED Performance ‣ Optimize or cut out images ‣

    Decrease the number of requests ‣ Gzip if you can ‣ Concat and minify CSS/JS ‣ Load CSS at the top ‣ Load JS at the bottom ‣ Follow @souders on Twitter
  459. Barriers

  460. LESSONS LEARNED Barriers ‣ Organization barriers block collaboration ‣ Must

    have buy in from upper management ‣ Must have buy in from those doing the work ‣ It’s not easy, we’re still
 figuring it out
  461. What’s Next

  462. Fluency SOLVE THE PROBLEM

  463. Jakob Nielsen Says... ‣ Build a separate mobile site ‣

    Cut features ‣ Cut content http://www.nngroup.com/articles/mobile-site-vs-full-site/
  464. Jakob Nielsen Says... ‣ Build a separate mobile site ‣

    Cut features ‣ Cut content http://www.nngroup.com/articles/mobile-site-vs-full-site/ PLEASE, NO.
  465. The Responsive Dip ! http://bit.ly/MasqBk

  466. Responsive web design is about much more than making stuff

    fit on small screens.
  467. viewport width input method context low bandwidth no bandwidth available

    light location history state of mind intent viewport height right content speed user preference cross-width consistency Web Design
  468. Web Design viewport width input method context low bandwidth no

    bandwidth available light location history state of mind intent viewport height right content speed user preference cross-width consistency
  469. The Responsive Mindset ! “The truly responsive design web designer

    wasn’t born until after the launch of the iPhone. We haven’t seen his or her work yet.” ! Andy Clarke ! http://the-pastry-box-project.net/andy-clarke/2012-april-8/
  470. ! There are many problems left to solve. ! We’ll

    solve them much faster if we solve them together.
  471. THANKS! @bencallahan @jeremyloyd