108
Responsive Design In the Real World @clarissa

Responsive Design in the Real World

Embed Size (px)

DESCRIPTION

Presentation at Snow*Mobile conference in Madison, Wisconsin

Citation preview

Page 1: Responsive Design in the Real World

Responsive DesignIn the Real World

@clarissa

Page 2: Responsive Design in the Real World

What We’ll Cover:Frameworks

Navigation Patterns

Preprocessors

Polyfills

Page 3: Responsive Design in the Real World

Illustration credit: Anna Debenham via Creative Commons http://flic.kr/p/dtMQTL

Page 4: Responsive Design in the Real World

Responsive Design

Page 5: Responsive Design in the Real World

http://bostonglobe.com

Page 6: Responsive Design in the Real World

http://bostonglobe.com

Page 7: Responsive Design in the Real World

http://bostonglobe.com

Page 8: Responsive Design in the Real World

Frameworks

Page 9: Responsive Design in the Real World

Photo Credit: Garreth Wilcock via Creative Commons http://flic.kr/p/aDJVzT

Page 10: Responsive Design in the Real World

Photo Credit: Matti Mattila via Creative Commons http://flic.kr/p/buX4Sb

Page 11: Responsive Design in the Real World

http://foundation.zurb.com/

Page 12: Responsive Design in the Real World

http://foundation.zurb.com/

Page 13: Responsive Design in the Real World

http://foundation.zurb.com/

Page 14: Responsive Design in the Real World

http://foundation.zurb.com/

Page 16: Responsive Design in the Real World

http://bonbonsbakery.com.au/

Page 17: Responsive Design in the Real World

http://bonbonsbakery.com.au/

Page 18: Responsive Design in the Real World

http://bonbonsbakery.com.au/

Page 19: Responsive Design in the Real World

http://bonbonsbakery.com.au/

Page 20: Responsive Design in the Real World

<div class="row"> <div class="twelve columns"> ... </div></div><div class="row"> <div class="three columns"> ... </div> <div class="nine columns"> ... </div></div>

Page 21: Responsive Design in the Real World

class="show-for-xlarge"class="show-for-large"class="show-for-large-up"

(etc.)

class="hide-for-xlarge"

class="show-for-landscape"class="show-for-portrait"

class="show-for-touch"class="hide-for-touch"

Page 22: Responsive Design in the Real World

Design Process

Page 23: Responsive Design in the Real World

Photo Credit: Clarissa Peterson via Creative Commons http://flic.kr/p/35Ahx

Page 24: Responsive Design in the Real World

Design Develop

Page 25: Responsive Design in the Real World

Photo Credit: Chris Gladis via Creative Commons http://flic.kr/p/rZVTg

Page 26: Responsive Design in the Real World

Design

Develop

Page 27: Responsive Design in the Real World

Illustration credit: podluzny via Creative Commons http://flic.kr/p/cJJdzm

Page 28: Responsive Design in the Real World

Responsive Prototypes

Page 37: Responsive Design in the Real World

http://www.getskeleton.com

Page 39: Responsive Design in the Real World

Navigation Patterns

Page 41: Responsive Design in the Real World

http://www.gravitatedesign.com

Page 42: Responsive Design in the Real World

http://www.gravitatedesign.com

Page 43: Responsive Design in the Real World

http://www.gravitatedesign.com

Page 44: Responsive Design in the Real World

http://www.temple.edu/

Page 45: Responsive Design in the Real World

http://www.temple.edu/

Page 46: Responsive Design in the Real World

http://www.temple.edu/

Page 47: Responsive Design in the Real World

Toggle Navigation

Page 48: Responsive Design in the Real World

http://www.starbucks.com/

Page 49: Responsive Design in the Real World

http://starbucks.com/

Page 50: Responsive Design in the Real World

http://starbucks.com/

Page 51: Responsive Design in the Real World

http://starbucks.com/

Page 52: Responsive Design in the Real World

http://starbucks.com/

Page 55: Responsive Design in the Real World

<a href="#menu" class="menu-link">Menu</a><nav class="" id="menu" role="navigation">! <ul>! ! <li><a href="#">Home</a></li>! ! <li><a href="#">About</a></li>! ! <li><a href="#">Products</a></li>! ! <li><a href="#">Services</a></li>! ! <li><a href="#">Contact</a></li>! </ul></nav>

Page 57: Responsive Design in the Real World

<a href="#menu" class="menu-link">Menu</a><nav class="" id="menu" role="navigation">! <ul>! ! <li><a href="#">Home</a></li>! ! <li><a href="#">About</a></li>! ! <li><a href="#">Products</a></li>! ! <li><a href="#">Services</a></li>! ! <li><a href="#">Contact</a></li>! </ul></nav>

Page 58: Responsive Design in the Real World

.js nav[role=navigation] { ! overflow: hidden;! max-height: 0;}nav[role=navigation].active { ! max-height: 15em;}

Page 59: Responsive Design in the Real World

.js nav[role=navigation] { ! overflow: hidden;! max-height: 0;}nav[role=navigation].active { ! max-height: 15em;}

Page 60: Responsive Design in the Real World

<script>

(function() {

$(document).ready(function() {

$('body').addClass('js');

var $menu = $('#menu'),

$menulink = $('.menu-link');

$menulink.click(function() {

$menulink.toggleClass('active');

$menu.toggleClass('active');

return false;

});});

})();

</script>

Page 63: Responsive Design in the Real World

@media screen and (min-width: 48.25em) {! a.menu-link {! ! display: none;! }! .js nav[role=navigation] {! ! max-height: none;! }}

Page 64: Responsive Design in the Real World

@media screen and (min-width: 48.25em) {! a.menu-link {! ! display: none;! }! .js nav[role=navigation] {! ! max-height: none;! }}

Page 65: Responsive Design in the Real World

@media screen and (min-width: 48.25em) {! a.menu-link {! ! display: none;! }! .js nav[role=navigation] {! ! max-height: none;! }}

Page 66: Responsive Design in the Real World

Left Nav Flyout

Page 70: Responsive Design in the Real World

Preprocessors

Page 71: Responsive Design in the Real World

http://sass-lang.com/ and http://lesscss.org/

Page 72: Responsive Design in the Real World

Photo Credit: Umberto Salvagnin via Creative Commons http://flic.kr/p/dmtR5

Syntactic Sugar

Page 73: Responsive Design in the Real World

Photo Credit: Rinina25 and Twice25 via Creative Commons http://commons.wikimedia.org/wiki/File:Saluzzo-Castello_della_Manta-mago.jpg

Page 74: Responsive Design in the Real World

Sass

Page 75: Responsive Design in the Real World

Photo Credit: João Trindade via Creative Commons http://flic.kr/p/7DuvV4

Math

Page 76: Responsive Design in the Real World

.sidebar { width: percentage(360px / 960px);}

Page 77: Responsive Design in the Real World

.sidebar { width: 37.5%; }

Page 78: Responsive Design in the Real World

Photo Credit: Prem Sichanugrist via Creative Commons http://flic.kr/p/KPo5A

Nesting

Page 79: Responsive Design in the Real World

#navbar { width: 80%; height: 23px; }#navbar ul { list-style-type: none; }#navbar li { float: left; }

Page 80: Responsive Design in the Real World

#navbar { width: 80%; height: 23px; ul { list-style-type: none; } li { float: left; }}

Page 81: Responsive Design in the Real World

#navbar { width: 80%; height: 23px; ul { list-style-type: none; } li { float: left; }}

Page 82: Responsive Design in the Real World

#navbar { width: 80%; height: 23px; ul { list-style-type: none; } li { float: left; }}

Page 83: Responsive Design in the Real World

#navbar { width: 80%; height: 23px; }#navbar ul { list-style-type: none; }#navbar li { float: left; }

Page 84: Responsive Design in the Real World

Photo Credit: John McWhirter via Creative Commons http://flic.kr/p/7ujLsh

@media Bubbling

Page 85: Responsive Design in the Real World

.profile-pic { float: left; width: 100px; } @media screen and (min-width: 320px) { .profile-pic { width: 250px; } } @media screen and (min-width: 1200px) { .profile-pic { float: none; } }

Page 86: Responsive Design in the Real World

.profile-pic { float: left; width: 100px; @media screen and (min-width: 320px) { width: 250px; } @media screen and (min-width: 1200px) { float: none; }}

Page 87: Responsive Design in the Real World

.profile-pic { float: left; width: 100px; @media screen and (min-width: 320px) { width: 250px; } @media screen and (min-width: 1200px) { float: none; }}

Page 88: Responsive Design in the Real World

.profile-pic { float: left; width: 100px; @media screen and (min-width: 320px) { width: 250px; } @media screen and (min-width: 1200px) { float: none; }}

Page 89: Responsive Design in the Real World

.profile-pic { float: left; width: 100px; } @media screen and (min-width: 320px) { .profile-pic { width: 250px; } } @media screen and (min-width: 1200px) { .profile-pic { float: none; } }

Page 90: Responsive Design in the Real World

Variables

Page 91: Responsive Design in the Real World

$break-small: 320px;

$break-large: 1200px;

.profile-pic {

float: left;

width: 100px;

@media screen and (min-width: $break-small) {

width: 250px;

}

@media screen and (min-width: $break-large) {

float: none;

}

}

Page 92: Responsive Design in the Real World

Polyfills

Page 93: Responsive Design in the Real World

http://modernizr.com/

Page 94: Responsive Design in the Real World

<html class=" js canvas canvastext geolocation crosswindowmessaging no-websqldatabase indexeddb hashchange historymanagement draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms no-csstransforms3d csstransitions video audio localstorage sessionstorage webworkers applicationcache svg smil svgclippaths fontface">

Page 95: Responsive Design in the Real World

<html class=" js canvas canvastext geolocation crosswindowmessaging no-websqldatabase indexeddb hashchange historymanagement draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms no-csstransforms3d csstransitions video audio localstorage sessionstorage webworkers applicationcache svg smil svgclippaths fontface">

Page 96: Responsive Design in the Real World

<HTML class=" js no-canvas no-canvastext no-geolocation no-crosswindowmessaging no-websqldatabase no-indexeddb no-hashchange no-historymanagement draganddrop no-websockets no-rgba no-hsla no-multiplebgs no-backgroundsize no-borderimage no-borderradius no-boxshadow no-opacity no-cssanimations no-csscolumns no-cssgradients no-cssreflections no-csstransforms no-csstransforms3d no-csstransitions fontface no-video no-audio no-localstorage no-sessionstorage no-webworkers no-applicationcache no-svg no-smil no-svgclippaths">

Page 97: Responsive Design in the Real World

.no-cssgradients { ...}

Page 99: Responsive Design in the Real World

<!--[if lte IE 8]><script src=”js/respond.min.js”/></script><![endif]-->

Page 101: Responsive Design in the Real World

Resources

Page 104: Responsive Design in the Real World

Navigation

Responsive Navigation Patterns (Brad Frost) - February 2012http://bradfrostweb.com/blog/web/responsive-nav-patterns/

Complex Navigation Patterns for Responsive Design (Brad Frost) - August 2012http://bradfrostweb.com/blog/web/complex-navigation-patterns-for-responsive-design/

10 Responsive Navigation Solutions and Tutorials - August 2012http://speckyboy.com/2012/08/29/10-responsive-navigation-solutions-and-tutorials/

10 Tips How To Handle Responsive Navigation Menus Successfully (Sabina Idler) - October 2012http://blog.usabilla.com/10-tips-how-to-handle-responsive-navigation-menus-successfully/

Page 105: Responsive Design in the Real World

Preprocessors

Sass And LESS: An Introduction To CSS Preprocessors (Steven Bradley) - April 2012http://www.vanseodesign.com/css/css-preprocessors/

An Introduction To LESS, And Comparison To Sass (Jeremy Hixon) - September 2011http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/

Responsive Web Design in Sass: Using Media Queries in Sass 3.2 (Mason Wendell) - April 2012http://thesassway.com/intermediate/responsive-web-design-in-sass-using-media-queries-in-sass-32

Create faster fluid layouts with LESS (Paul Mist) - August 2012http://www.netmagazine.com/tutorials/create-faster-fluid-layouts-less

Page 106: Responsive Design in the Real World

Books to Read

Responsive Web DesignEthan Marcotte (2011)http://www.abookapart.com/products/responsive-web-design/

Mobile First Luke Wroblewski (2011)http://www.abookapart.com/products/mobile-first

Adaptive Web Design: Crafting Rich Experiences with Progressive EnhancementAaron Gustafson (2011)http://easy-readers.net/books/adaptive-web-design/

Implementing Responsive Design: Building sites for an anywhere, everywhere webTim Kadlec (2012)http://www.implementingresponsivedesign.com/

Page 107: Responsive Design in the Real World

Other Websites & Misc.

@RWDlinks about responsive design (Ethan Marcotte)https://twitter.com/RWD

Future Friendlymaking things that are future-friendlyhttp://futurefriend.ly/

Brad Frostblog that covers responsive designhttp://bradfrostweb.com/blog/

Mediaqueri.esinspirational websites using media queries and responsive web designhttp://mediaqueri.es/

Page 108: Responsive Design in the Real World

@clarissa clarissapeterson.com