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

Build Right: Build Responsively 2014

Build Right
February 24, 2014

Build Right: Build Responsively 2014

The deck from the full day Build Right: Build Responsively workshop in Dayton, Ohio on February 24, 2014.

Build Right

February 24, 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 Not that far away…
  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. Me too! Ditto! Old Linear Workflow Now with RWD! CONTENT

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

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

    Content Priority Guides ‣ Content Prototypes ‣ Static Wireframes ‣ Interactive Wireframes
  20. “I’ve been amazed at how often those outside the discipline

    of design assume that what designers do is decoration. Good design is problem solving.” ! @veen
  21. 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/
  22. 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
  23. Establish ! Solve ! Refine ................. Comfort ! ....................... Fluency

    ! ................... Efficiency Guidelines for Selecting Tools
  24. 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
  25. 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
  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 The Problem of the Individual
  27. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

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

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

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

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

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

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

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

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

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

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

    #333; width: 100%; }" ! /* if the viewport width is 40em or greater */"
  43. 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%; }" }"
  44. 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%; }" }"
  45. 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%; }" }
  46. 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%; }" }
  47. 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%; }" }
  48. 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
  49. SERVING RWD STYLES Major Approaches ‣ Single CSS File ‣

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  50. 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/
  51. 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]-->
  52. 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]-->
  53. 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]-->
  54. 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]-->
  55. 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]-->
  56. Multiple CSS Files global.css" ! aside {" color: #333;" width:

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

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

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

    (lt IE 9) & (!IEMobile)]>" <link href=”no-mq.css” rel=”stylesheet”>" <![endif]-->
  62. 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%; }
  63. 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%; }
  64. 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%; }
  65. 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%; }
  66. 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%; }
  67. 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%; }
  68. 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%; }
  69. 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%; }
  70. styles.scss styles.css We write SASS
 (or LESS, Stylus, etc.) Browser

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

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

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

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

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

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

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

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

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

    Multiple CSS Files ‣ Breakpoint Based Partials ‣ Module Based Partials
  87. 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
  88. 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]-->
  89. 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]-->
  90. 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]-->
  91. 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]-->
  92. 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]-->
  93. 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]-->
  94. 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%; }
  95. 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%; }
  96. 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%; }
  97. 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%; }
  98. 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%; }
  99. 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%; }
  100. 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%; }
  101. 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”;" ...
  102. 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”;" ...
  103. 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”;" ...
  104. 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”;" ...
  105. Module Based Partials _aside.scss" ! ! aside {" color: #333;

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

    width: 100%;" ! @include sb-media(40em) {" width: 50%; }" ! @include sb-media(60em) {" width: 30%; }" }
  107. 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%; }
  108. 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
  109. 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
  110. 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" ..." }
  111. 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" ..." }
  112. Discussion ‣ How are you serving RWD 
 styles today?

    ‣ How do you “support” older IE?
  113. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

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

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

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

    Skeleton ‣ Responsive.gs ‣ Columnal ‣ ...this list goes on, and on, and on
  119. 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); }" }
  120. 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); }" }
  121. 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); }" }
  122. 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); }" }
  123. 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); }" }
  124. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

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

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

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

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

    ‣ Typography ‣ Images ‣ Tables ‣ Video
  131. CREATING FLEXIBILITY Responsive Typography ‣ Small screen != small font-size

    ‣ Consider contrast ‣ If text has links, give adequate room to touch them ‣ Viewport-based type sizing
  132. CREATING FLEXIBILITY Responsive Typography ‣ Small screen != small font-size

    ‣ Consider contrast ‣ If text has links, give adequate room to touch them ‣ Viewport-based type sizing
  133. CREATING FLEXIBILITY Responsive Typography ‣ Small screen != small font-size

    ‣ Consider contrast ‣ If text has links, give adequate room to touch them ‣ Viewport-based type sizing
  134. CREATING FLEXIBILITY Responsive Typography ‣ Small screen != small font-size

    ‣ Consider contrast ‣ If text has links, give adequate room to touch them ‣ Viewport-based type sizing
  135. CREATING FLEXIBILITY Responsive Typography ‣ Small screen != small font-size

    ‣ Consider contrast ‣ If text has links, give adequate room to touch them ‣ Viewport-based type sizing
  136. CREATING FLEXIBILITY What Needs to Flex ‣ Grids ‣ Layout

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

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

    ‣ Pixel-density media queries ‣ Compressive ‣ Polyfill new markup patterns ‣ User preference
  141. 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.
  142. 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.
  143. 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>
  144. “Compressive” Images ‣ http://bit.ly/Sygdey ‣ Increase the image dimensions ‣

    Add massive compression ‣ Scale the image in the browser
  145. 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.
  146. 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%;" }" }
  147. User Preference ‣ Allow the user to choose what experience

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

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

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

    What specific challenges are you facing in creating flexibility?
  151. 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
  152. A Taxonomy ‣ Trigger Indicators ‣ Trigger Patterns ! ‣

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

    navigation ‣ sections, site sections,
 topics, products ‣ products, see products ‣ Icons ‣ plus ‣ hamburger ‣ arrows
  154. Trigger Indicators ‣ Words ‣ menu, main menu ‣ nav,

    navigation ‣ sections, site sections,
 topics, products ‣ products, see products ‣ Icons ‣ plus ‣ hamburger ‣ arrows
  155. Trigger Patterns ‣ Always Available ‣ Anchor to Footer ‣

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

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

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

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

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

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

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

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

    solve them much faster if we solve them together.