Top Banner
RESPONSIVE & RESPONSIBLE @vaibhavkanwal
29

Responsive and Responsible

Aug 31, 2014

Download

Design

Vaibhav Kanwal

Slides from my talk on Responsive Design at BarCamp 8 Delhi at TLabs, New Delhi on 4th August 2012

I talk on how Startups can use Media Queries to create device agnostic experiences using a single version of their websites/web apps

References : Pragmatic Responsive by Stephanie Rieger in Nashville for Breaking Development 2011
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Responsive and Responsible

RESPONSIVE &

RESPONSIBLE@vaibhavkanwal

Page 2: Responsive and Responsible

TODAY’S AGENDA1. Intro & Benefits2. Demo3. Process4. Tools5. Pizza Party :)

Page 3: Responsive and Responsible
Page 4: Responsive and Responsible

the script fires again... on an orientation change

or screen resize

Page 5: Responsive and Responsible
Page 6: Responsive and Responsible

RWD FORMULANot a religion, just math

target / context = result

Page 7: Responsive and Responsible

RWD FORMULAtarget / context = result

300px / 1000px = 0.3 /* Ratio */

Page 8: Responsive and Responsible

QUIZ TIMEHow to make a 280px sidebar in a 960px layout?

Page 9: Responsive and Responsible

QUIZ TIMEHow to make a 280px sidebar in a 960px layout?

Q : 280px / 960px = ??

Page 10: Responsive and Responsible

QUIZ TIMEHow to make a 280px sidebar in a 960px layout?

Q : 280px / 960px = ??

A : 0.291666667 ~ 30%

Page 11: Responsive and Responsible

Sidebar {width:30%}

Page 12: Responsive and Responsible

MEDIA QUERIES@media screen and (min-width: 600px) { /* DO WHATEVER YOU WANT HERE */}

Page 13: Responsive and Responsible

an emerging process

sketches/IA basic visual mockups

“live”responsive

mockup

more sketches

“live”responsive

mockup

small visual mockups to discuss specific

stylistic issues

“live” responsivemockup to “reality check”

performance and progressive enhancement

etc...

ok?

yes

no

Page 14: Responsive and Responsible

fully flexible with default styles for navigation, fonts, content and no media query

begin with a lightweight default

A

B

C

Page 15: Responsive and Responsible

a common approachOne style sheet with media queries on the inside.

styles.css

@media {(min-width: 480px)

}

@media {(min-width: 640px)

}

@media {(min-width: 768px)

}

@media {(min-width: 320px)

}

a single css !le is network e"cient, but includes unnecessary style data that all devices end up downloading

Page 16: Responsive and Responsible

MAJOR BREAKPOINTS IN DOCUMENT HEAD

a more robust optionMultiple style sheets with media queries on the inside.

basic.css mobile.css desktop.css

MINOR BREAKPOINTS WITHIN EACH STYLE SHEET

@media {(min-width: 480px)

}

@media {(min-width: 640px)

}

@media {(min-width: 768px)

}

(typically) no media queries

Page 17: Responsive and Responsible

when queried, these devices will all return a 320 pixel wide viewport value but each have vastly di!erent browsers

• advanced CSS and JavaScript

• touch events• modern WebKit

• very basic CSS and JavaScript

• no touch screen• XHTML MP

• good CSS and JavaScript

• no touch screen• early WebKit

• strong CSS and JavaScript support but using proxy browser such as Opera Mini

PAIN POINT

Page 18: Responsive and Responsible

Media queries detect screen size and serve

size-appropriate styles and behaviours

layout

Feature detectionclarifies actual browser capabilities and enables further enhancements

appropriately sized

graphics

enhanced look and feel

basic lookand feel

functionality enhancements

basic functionality

+someday we’ll (hopefully) be able to detect other useful

stu! like bandwidth

(even) more appropriate graphics or

media formats(e.g. SVG)

STEP 1 STEP 2

Page 19: Responsive and Responsible

STEP 1 STEP 2 STEP 3

Develop an action planto address common issues such as these:

• key content that is only accessible on hover

• key controls that are too small to manipulate on touch screens

• modal windows that become unusable on small screens

• unnecessary http requests• unnecessarily heavy

graphics and media

Review your tra!c logs and determine what mobile devices are accessing your site today

Test your site on those devices and determine where the experience breaks down

repeat...

Page 20: Responsive and Responsible

GUIDELINESDon’t use PXUSE EM

ALWAYS

#1

Page 21: Responsive and Responsible

GUIDELINESUse icon-fonts#2

Page 22: Responsive and Responsible

GUIDELINES

Typography

#3

Page 23: Responsive and Responsible

TOOLSEverybody loves free stuff!

Page 25: Responsive and Responsible

LIBRARIEShttp://fitvidsjs.com/

Page 26: Responsive and Responsible

LIBRARIEShttp://adaptive-images.com

Page 27: Responsive and Responsible

LIBRARIEShttp://modernizr.com

Page 28: Responsive and Responsible

INSPIRATIONhttp://mediaqueri.es

Page 29: Responsive and Responsible

TADA!Vaibhav Kanwalhttp://vaibhavkanwal.com@vaibhavkanwal