Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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.

Build Right

May 01, 2014
Tweet

More Decks by Build Right

Other Decks in Design

Transcript

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

    today as it was in 2007. http://bit.ly/zE1zgp In the US...
  2. 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
  3. 0 500 1000 1500 2000 2007 2008 2009 2010 2011

    2012 2013 2014 2015 Mobile Users Desktop Users http://bit.ly/L5cqiO Happening now.
  4. RWD 101 ‣ Three Core Techniques - A Fluid Foundation

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

    creating percentage-based layout instead of fixed-width, pixel-based layout.
  6. Flexible Content Once we have a layout which is based

    on proportions, the content must also respond.
  7. 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
  8. 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
  9. 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
  10. We the People of the United States, in Order to

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

    in Order to form a more perfect Union, (Image) 600px
  12. 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
  13. Media Queries When our content and our design are no

    longer working in harmony, we need to make a larger shift in layout.
  14. A 100% C 100% B 100% C 40% B 60%

    A 100% Media Queries
  15. RWD 101 ‣ Three Core Techniques - A Fluid Foundation

    - Flexible Content - Media Queries
  16. Your Turn ‣ Code a simple responsive site using the

    three core RWD techniques ‣ Fluid Foundation ‣ Flexible Content ‣ Media Queries
  17. 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
  18. Me too! Ditto! Old Linear Workflow Now with RWD! CONTENT

    UX DESIGN FRONT-END BACK-END LAUNCH!
  19. LAUNCH DESIGN FRONT END BACK END CONTENT DECISIONS MADE DECISIONS

    MADE DECISIONS MADE DECISIONS MADE CONTENT UX FRONT-END DESIGN BACK-END
  20. 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
  21. Content & Planning ‣ Content Audit ‣ Information Architecture ‣

    Content Priority Guides ‣ Content Prototypes ‣ Static Wireframes ‣ Interactive Wireframes
  22. 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/
  23. 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
  24. Establish ! Solve ! Refine ................. Comfort ! ....................... Fluency

    ! ................... Efficiency Guidelines for Selecting Tools
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. The rigidity of your process should be inversely proportional to

    the level of fluency, humility, and empathy demonstrated by your team.
  31. 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
  32. 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
  33. 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
  34. 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
  35. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

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

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

    do this: <!-- html -->
 <meta name="viewport"
 content="width=device-width; 
 initial-scale=1.0;">
  38. 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; }"
  39. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

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

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

    #333; width: 100%; }" ! /* if the viewport width is 40em or greater */"
  42. 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) { ... }
  43. 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) { ... }
  44. Media Types all braille, embossed, speech handheld, projection, screen, tv

    print tty http://www.w3.org/TR/CSS21/media.html#media-types
  45. 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) { ... }
  46. 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
  47. Single CSS File HTML <link> CSS ! Start with styles

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

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

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

    #333; width: 100%; }" ! /* if the viewport width is 40em or greater */"
  51. 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%; }" }"
  52. 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%; }" }"
  53. 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%; }" }
  54. 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%; }" }
  55. 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%; }" }
  56. 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
  57. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  58. 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/
  59. 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]-->
  60. 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]-->
  61. 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]-->
  62. 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]-->
  63. 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]-->
  64. Multiple CSS Files global.css" ! aside {" color: #333;" width:

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

    100%;" } layout.css" ! aside { width: 50%; }" ! @media (min-width: 60em) {" aside { width: 30%; }" }
  66. 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
  67. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  68. 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/
  69. Breakpoint Based Partials index.html" ! <link href=”base.css” rel=”stylesheet”>" ! <!--[if

    (lt IE 9) & (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->
  70. 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%; }
  71. 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%; }
  72. 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%; }
  73. 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%; }
  74. 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%; }
  75. 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%; }
  76. 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%; }
  77. 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%; }
  78. styles.scss styles.css We write Sass
 (or LESS, Stylus, etc.) Browser

    gets CSS
 (like it always has) PREPROCESSING What is CSS Preprocessing?
  79. LESS syntax Variables are specified with @ symbol ! /*

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

    - You can omit semi-colons, colons, and braces ‣ http://learnboost.github.com/ stylus/
  81. 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.
  82. Sass ‣ Runs on Ruby ‣ Has two syntax flavors

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

    color: $main-color;" font-size: 0.3em;" }" ! /* .sass */" #main" color: $main-color" font-size: 0.3em
  84. 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;" }" }" }
  85. Nesting can be abused. /* This is bad. Don’t do

    it. */" ! html body #main div.primary .big-header {" font-size: 2em;" } !
  86. Mixins /*.scss*/" ! @mixin border-radius( $value : 10px ) {"

    " -webkit-border-radius: $value;" " -moz-border-radius: $value;" " " " border-radius: $value;" } .btn{" @include border-radius(25px);" }
  87. 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...
  88. 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
  89. Importing ‣ Allows you to break up your styles across

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

    ! @import "compass";" @import "variables";" @import "reset";" @import "mixins";" @import "header";" @import "hero";" @import "whatever";
  91. 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%; }
  92. _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%;}
  93. 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
  94. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  95. 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
  96. 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]-->
  97. 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]-->
  98. 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]-->
  99. 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]-->
  100. 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]-->
  101. 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]-->
  102. 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%; }
  103. 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%; }
  104. 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%; }
  105. 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%; }
  106. 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%; }
  107. 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%; }
  108. 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%; }
  109. 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”;" ...
  110. 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”;" ...
  111. 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”;" ...
  112. 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”;" ...
  113. Module Based Partials _aside.scss" ! ! aside {" color: #333;

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

    width: 100%;" ! @include sb-media(40em) {" width: 50%; }" ! @include sb-media(60em) {" width: 30%; }" }
  115. 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%; }
  116. 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
  117. 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
  118. 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" ..." }
  119. 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" ..." }
  120. Your Turn ‣ Modify your simple RWD experiment to use

    the sb-media mixin. ‣ https://github.com/sparkbox/SB-Media
  121. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

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

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  123. 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;" }
  124. 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;" }
  125. It starts with the grid body {" width: 100%;" }"

    ! aside {" width: 28%;" } target / context = % 280 / 1000 = .28 .28 = 28% body {" width: 1000px;" }" ! aside {" width: 280px;" }
  126. CREATING FLEXIBILITY RWD Grid Systems ‣ Foundation ‣ Bootstrap ‣

    Skeleton ‣ Responsive.gs ‣ Columnal ‣ ...this list goes on, and on, and on
  127. 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); }" }
  128. 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); }" }
  129. 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); }" }
  130. 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); }" }
  131. 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); }" }
  132. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  133. HEADER HEADER CONTENT 1 CONTENT 1 CONTENT 2 CONTENT 2

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

    AD SEARCH SEARCH AD FOOTER Large Resolution Small Resolution
  135. <!-- 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>
  136. .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; }" }
  137. There are many, many combinations of these basic ideas !

    http://bit.ly/U4N5qH ! (http://bradfrost.github.com/this-is-responsive/patterns.html)
  138. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  139. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

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

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

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

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

    ‣ Consider contrast ‣ Spacing and Heirarchy ‣ Type sizing ‣ Line length ‣ Line breaks
  144. @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
  145. CREATING FLEXIBILITY Responsive Typography ‣ Small screen ≠ small font-size

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

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

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  148. 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/
  149. CREATING FLEXIBILITY Image: Bandwidth Responsive & Responsible ! via @scotjehl

    https://speakerdeck.com/scottjehl/responsive-responsible http://www.lukew.com/ff/entry.asp?1565
  150. 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
  151. CREATING FLEXIBILITY The image solution(s) ‣ SVG ‣ Icon fonts

    ‣ Pixel-density media queries ‣ Compressive ‣ New markup ‣ Intercepting requests ‣ User preference
  152. 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.
  153. 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.
  154. 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>
  155. Compressive Images ‣ http://bit.ly/Sygdey ‣ Increase the image dimensions ‣

    Add massive compression ‣ Scale the image in the browser
  156. 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.
  157. 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%;" }" }
  158. Intercepting Requests ‣ As a service (via url prefix) -

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

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

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

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  162. Discussion ‣ What content types have we not addressed? ‣

    What specific challenges are you facing in creating flexibility?
  163. 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
  164. A Taxonomy ‣ Trigger Indicators ‣ Trigger (reveal) Patterns !

    ‣ Interaction Indicators ‣ Interaction Patterns
  165. Trigger Indicators ‣ Words ‣ menu, main menu ‣ nav,

    navigation ‣ site specific
 (sections, topics,
 products, etc.) ‣ Icons ‣ plus ‣ hamburger ‣ arrows ‣ “x”
  166. Trigger Indicators ‣ Words ‣ menu, main menu ‣ nav,

    navigation ‣ site specific
 (sections, topics,
 products, etc.) ‣ Icons ‣ plus ‣ hamburger ‣ arrows ‣ “x”
  167. Trigger Patterns ‣ Always Available ‣ Anchor to Footer ‣

    Select Element ‣ Make Room ‣ Cover Up ‣ Off Canvas ‣ Priority + ‣ Full Screen Takeover
  168. Trigger Patterns ‣ Always Available ‣ Anchor to Footer ‣

    Select Element ‣ Make Room ‣ Cover Up ‣ Off Canvas ‣ Priority + ‣ Full Screen Takeover
  169. Discussion ‣ How are you handling navigation in your RWD

    projects? ‣ Have you been able to push back on IA?
  170. LESSONS LEARNED Testing ‣ You must test on real devices

    ‣ Do your development in a webkit browser ‣ Build libraries of your patterns
  171. LESSONS LEARNED Pricing ‣ As much as 100% more, initially

    ‣ Likely to be 50% more, soon after ‣ Probably never less than 25% more
  172. 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?
  173. LESSONS LEARNED Pricing ‣ Testing (labs & time) ‣ Fewer

    patterns ‣ Project management ‣ Learning curve ‣ Maintenance ‣ Content strategy
  174. 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
  175. 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
  176. Jakob Nielsen Says... ‣ Build a separate mobile site ‣

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

    Cut features ‣ Cut content http://www.nngroup.com/articles/mobile-site-vs-full-site/ PLEASE, NO.
  178. 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
  179. 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
  180. 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/
  181. ! There are many problems left to solve. ! We’ll

    solve them much faster if we solve them together.