Things To Keep In Mind When Working In The World Of Responsive Design

224
this is a slide

Transcript of Things To Keep In Mind When Working In The World Of Responsive Design

Page 1: Things To Keep In Mind When Working In The World Of Responsive Design

this is a slide

Page 2: Things To Keep In Mind When Working In The World Of Responsive Design

we will see lots of them

Page 3: Things To Keep In Mind When Working In The World Of Responsive Design

things to keep in mind when working in the world of responsive design

Page 4: Things To Keep In Mind When Working In The World Of Responsive Design

firstly

Page 5: Things To Keep In Mind When Working In The World Of Responsive Design

booklets + website + etc

Page 6: Things To Keep In Mind When Working In The World Of Responsive Design

long a** title

Page 7: Things To Keep In Mind When Working In The World Of Responsive Design

haris mahmood@harismahmood89

Page 8: Things To Keep In Mind When Working In The World Of Responsive Design

excited

Page 9: Things To Keep In Mind When Working In The World Of Responsive Design

the hype is real

Page 10: Things To Keep In Mind When Working In The World Of Responsive Design

slow down the hype train

Page 11: Things To Keep In Mind When Working In The World Of Responsive Design

$#!+

Page 12: Things To Keep In Mind When Working In The World Of Responsive Design

shopify

Page 13: Things To Keep In Mind When Working In The World Of Responsive Design

hackeryou

Page 14: Things To Keep In Mind When Working In The World Of Responsive Design

ladies learning code

Page 15: Things To Keep In Mind When Working In The World Of Responsive Design

freelancermeetharis.com

Page 16: Things To Keep In Mind When Working In The World Of Responsive Design

focuspocus.io

Page 17: Things To Keep In Mind When Working In The World Of Responsive Design

devtoast.io

Page 18: Things To Keep In Mind When Working In The World Of Responsive Design

repitsupply.com

Page 19: Things To Keep In Mind When Working In The World Of Responsive Design

repitsupply.com

Page 20: Things To Keep In Mind When Working In The World Of Responsive Design

haris mahmood@harismahmood89

Page 21: Things To Keep In Mind When Working In The World Of Responsive Design

kingpin@harismahmood89

Page 22: Things To Keep In Mind When Working In The World Of Responsive Design

emma watson

Page 23: Things To Keep In Mind When Working In The World Of Responsive Design

our story starts

Page 24: Things To Keep In Mind When Working In The World Of Responsive Design

300 BC

Page 25: Things To Keep In Mind When Working In The World Of Responsive Design

table layouts

Page 26: Things To Keep In Mind When Working In The World Of Responsive Design
Page 27: Things To Keep In Mind When Working In The World Of Responsive Design
Page 28: Things To Keep In Mind When Working In The World Of Responsive Design

time went by

Page 29: Things To Keep In Mind When Working In The World Of Responsive Design

mobile browsers

Page 30: Things To Keep In Mind When Working In The World Of Responsive Design

website.com

Page 31: Things To Keep In Mind When Working In The World Of Responsive Design

m.website.com

Page 32: Things To Keep In Mind When Working In The World Of Responsive Design

ibm

Page 33: Things To Keep In Mind When Working In The World Of Responsive Design

2010

Page 34: Things To Keep In Mind When Working In The World Of Responsive Design

ethan marcotte

Page 35: Things To Keep In Mind When Working In The World Of Responsive Design

responsive web design

Page 36: Things To Keep In Mind When Working In The World Of Responsive Design

three main features

Page 37: Things To Keep In Mind When Working In The World Of Responsive Design

fluid grids

Page 38: Things To Keep In Mind When Working In The World Of Responsive Design

flexible images

Page 39: Things To Keep In Mind When Working In The World Of Responsive Design

media queries

Page 40: Things To Keep In Mind When Working In The World Of Responsive Design

technical ingredients of rwd

Page 41: Things To Keep In Mind When Working In The World Of Responsive Design

most importantly

Page 42: Things To Keep In Mind When Working In The World Of Responsive Design

“… a different way of thinking”

Page 43: Things To Keep In Mind When Working In The World Of Responsive Design

6 years later

Page 44: Things To Keep In Mind When Working In The World Of Responsive Design

continuously changing landscape

Page 45: Things To Keep In Mind When Working In The World Of Responsive Design

features + tools + tips + pointers

Page 46: Things To Keep In Mind When Working In The World Of Responsive Design

I

Page 47: Things To Keep In Mind When Working In The World Of Responsive Design

css layouts

Page 48: Things To Keep In Mind When Working In The World Of Responsive Design

floats

Page 49: Things To Keep In Mind When Working In The World Of Responsive Design

focus on individual elements

Page 50: Things To Keep In Mind When Working In The World Of Responsive Design

flexbox

Page 51: Things To Keep In Mind When Working In The World Of Responsive Design
Page 52: Things To Keep In Mind When Working In The World Of Responsive Design

no longer about individual elements

Page 53: Things To Keep In Mind When Working In The World Of Responsive Design

flow

Page 54: Things To Keep In Mind When Working In The World Of Responsive Design

container

Page 55: Things To Keep In Mind When Working In The World Of Responsive Design

flow of elements

Page 56: Things To Keep In Mind When Working In The World Of Responsive Design

flow of flex children

Page 57: Things To Keep In Mind When Working In The World Of Responsive Design

direction, alignment, etc

Page 58: Things To Keep In Mind When Working In The World Of Responsive Design

cohesive whole

Page 59: Things To Keep In Mind When Working In The World Of Responsive Design

sizing

Page 60: Things To Keep In Mind When Working In The World Of Responsive Design

“what width does x need to be?”

Page 61: Things To Keep In Mind When Working In The World Of Responsive Design

“what width/ratio does x need to be relative to its

siblings?”

Page 62: Things To Keep In Mind When Working In The World Of Responsive Design
Page 63: Things To Keep In Mind When Working In The World Of Responsive Design

width: 66% width: 33%

Page 64: Things To Keep In Mind When Working In The World Of Responsive Design

flex-grow: 2 flex-grow: 1

Page 65: Things To Keep In Mind When Working In The World Of Responsive Design

how do these items flow together

Page 66: Things To Keep In Mind When Working In The World Of Responsive Design

common layout example

Page 67: Things To Keep In Mind When Working In The World Of Responsive Design
Page 68: Things To Keep In Mind When Working In The World Of Responsive Design
Page 69: Things To Keep In Mind When Working In The World Of Responsive Design

absolute positioning

Page 70: Things To Keep In Mind When Working In The World Of Responsive Design

absolute position

margin-top /

padding-top

Page 71: Things To Keep In Mind When Working In The World Of Responsive Design

yuck.

Page 72: Things To Keep In Mind When Working In The World Of Responsive Design
Page 73: Things To Keep In Mind When Working In The World Of Responsive Design

flexbox

Page 74: Things To Keep In Mind When Working In The World Of Responsive Design

flex-direction: row-reverseflex-direction: row

Page 75: Things To Keep In Mind When Working In The World Of Responsive Design

flex-direction: row-reverse

Page 76: Things To Keep In Mind When Working In The World Of Responsive Design

display: inline-block

Page 77: Things To Keep In Mind When Working In The World Of Responsive Design

inline-blockinline-block

Page 78: Things To Keep In Mind When Working In The World Of Responsive Design

direction: rtlinline-blockinline-block

Page 79: Things To Keep In Mind When Working In The World Of Responsive Design

control content flow

Page 80: Things To Keep In Mind When Working In The World Of Responsive Design

II

Page 81: Things To Keep In Mind When Working In The World Of Responsive Design

sizing + measurements

Page 82: Things To Keep In Mind When Working In The World Of Responsive Design

px

Page 83: Things To Keep In Mind When Working In The World Of Responsive Design

fixed pixel based layouts

Page 84: Things To Keep In Mind When Working In The World Of Responsive Design

percentage based

Page 85: Things To Keep In Mind When Working In The World Of Responsive Design

width: 100%; max-width: 1200px;

Page 86: Things To Keep In Mind When Working In The World Of Responsive Design

push further

Page 87: Things To Keep In Mind When Working In The World Of Responsive Design

%, em, rem, vh, vw

Page 88: Things To Keep In Mind When Working In The World Of Responsive Design

foundation 5

Page 89: Things To Keep In Mind When Working In The World Of Responsive Design

bootstrap 4

Page 90: Things To Keep In Mind When Working In The World Of Responsive Design

h1 { font-size: 70px; }

p.large { font-size: 16px; }

Page 91: Things To Keep In Mind When Working In The World Of Responsive Design

h1 { font-size: 70px; }

p.large { font-size: 16px; }

@media query { h1 { font-size: 50px; }

p.large { font-size: 13px; } }

Page 92: Things To Keep In Mind When Working In The World Of Responsive Design

html { font-size: 14px; }

h1 { font-size: 3rem; }

p.large { font-size: 1.2rem; }

Page 93: Things To Keep In Mind When Working In The World Of Responsive Design

html { font-size: 14px; }

h1 { font-size: 3rem; }

p.large { font-size: 1.2rem; }

@media query { html { font-size: 10px; } }

Page 94: Things To Keep In Mind When Working In The World Of Responsive Design

explore + implement

Page 95: Things To Keep In Mind When Working In The World Of Responsive Design

rip px

Page 96: Things To Keep In Mind When Working In The World Of Responsive Design

III

Page 97: Things To Keep In Mind When Working In The World Of Responsive Design

media queries

Page 98: Things To Keep In Mind When Working In The World Of Responsive Design

<link rel="stylesheet" type="text/css" media="screen and (min-device-width: 480px)" href="small.css" />

<link rel="stylesheet" type="text/css" media="screen and (min-device-width: 760px)" href="medium.css" />

<link rel="stylesheet" type="text/css" media="screen and (min-device-width: 960px)" href="big.css" />

Page 99: Things To Keep In Mind When Working In The World Of Responsive Design

@media screen and min-width(480px) { //css }

@media screen and min-width(760px) { //css }

@media screen and min-width(960px) { //css }

Page 100: Things To Keep In Mind When Working In The World Of Responsive Design

if you notice yourself doing this:

Page 101: Things To Keep In Mind When Working In The World Of Responsive Design

@media screen and min-width(480px) { //css }

@media screen and min-width(490px) { //css }

@media screen and min-width(530px) { //css }

Page 102: Things To Keep In Mind When Working In The World Of Responsive Design

you’re doing something wrong

Page 103: Things To Keep In Mind When Working In The World Of Responsive Design

avoid fixed measurements + absolute positioning + magic

numbers

Page 104: Things To Keep In Mind When Working In The World Of Responsive Design

width: 43px;

Page 105: Things To Keep In Mind When Working In The World Of Responsive Design

width: 43px;

Page 106: Things To Keep In Mind When Working In The World Of Responsive Design

shitty magic

Page 107: Things To Keep In Mind When Working In The World Of Responsive Design
Page 108: Things To Keep In Mind When Working In The World Of Responsive Design

IV

Page 109: Things To Keep In Mind When Working In The World Of Responsive Design

rwd at scale

Page 110: Things To Keep In Mind When Working In The World Of Responsive Design
Page 111: Things To Keep In Mind When Working In The World Of Responsive Design

maintain + organize

Page 112: Things To Keep In Mind When Working In The World Of Responsive Design

large projects

Page 113: Things To Keep In Mind When Working In The World Of Responsive Design

large teams

Page 114: Things To Keep In Mind When Working In The World Of Responsive Design

two recommendations

Page 115: Things To Keep In Mind When Working In The World Of Responsive Design

preprocessed css

Page 116: Things To Keep In Mind When Working In The World Of Responsive Design

sass, less, stylus, postcss

Page 117: Things To Keep In Mind When Working In The World Of Responsive Design

breakpoint mixin

Page 118: Things To Keep In Mind When Working In The World Of Responsive Design

@mixin breakpoint($point) {

@if $point == desktop { @media (min-width: 70em) { @content ; } }

@else if $point == tablet { @media (min-width: 50em) { @content ; } }

@else if $point == mobile { @media (max-width: 37.5em) { @content ; } }

}

Page 119: Things To Keep In Mind When Working In The World Of Responsive Design

.something { @include breakpoint(mobile) { padding: 10px; }

}

Page 120: Things To Keep In Mind When Working In The World Of Responsive Design

defined set of breakpoints

Page 121: Things To Keep In Mind When Working In The World Of Responsive Design

ensures consistency

Page 122: Things To Keep In Mind When Working In The World Of Responsive Design

active discussion and proper maintenance

Page 123: Things To Keep In Mind When Working In The World Of Responsive Design

modular css

Page 124: Things To Keep In Mind When Working In The World Of Responsive Design

separate your css into ‘objects’ and ‘concerns’

Page 125: Things To Keep In Mind When Working In The World Of Responsive Design

// main.scss

@import ‘base’; @import ‘typography’; @import ‘wrapper’; @import ‘buttons’; @import ‘tiles’;

Page 126: Things To Keep In Mind When Working In The World Of Responsive Design

// _base.scss

body { margin: 0; }

* { box-sizing: border-box; }

Page 127: Things To Keep In Mind When Working In The World Of Responsive Design

// _tiles.scss

.tile { padding: 30px;

@include breakpoint(mobile) { padding: 10px; } }

Page 128: Things To Keep In Mind When Working In The World Of Responsive Design

keeps all code related to a module together

Page 129: Things To Keep In Mind When Working In The World Of Responsive Design

helpers + utility classes

Page 130: Things To Keep In Mind When Working In The World Of Responsive Design

@import ‘helpers’;

Page 131: Things To Keep In Mind When Working In The World Of Responsive Design

// _helpers.scss

.h-textCenter { text-align: center; }

.h-textCenter-mobile { @include breakpoint(mobile) { text-align: center; } }

Page 132: Things To Keep In Mind When Working In The World Of Responsive Design

oocss + bem

Page 133: Things To Keep In Mind When Working In The World Of Responsive Design

harry roberts

Page 134: Things To Keep In Mind When Working In The World Of Responsive Design

shopify

Page 135: Things To Keep In Mind When Working In The World Of Responsive Design

better reusable and maintainable responsive

code

Page 136: Things To Keep In Mind When Working In The World Of Responsive Design

really sexy code

Page 137: Things To Keep In Mind When Working In The World Of Responsive Design

oh. you bet.

Page 138: Things To Keep In Mind When Working In The World Of Responsive Design

V

Page 139: Things To Keep In Mind When Working In The World Of Responsive Design

“desktop” vs “mobile”

Page 140: Things To Keep In Mind When Working In The World Of Responsive Design

iPad, iPhone, a couple others

Page 141: Things To Keep In Mind When Working In The World Of Responsive Design

no longer sufficient

Page 142: Things To Keep In Mind When Working In The World Of Responsive Design

devices + interactions

Page 143: Things To Keep In Mind When Working In The World Of Responsive Design

Hundreds of device sizes + pixel density

Page 144: Things To Keep In Mind When Working In The World Of Responsive Design

iPhone VS iPhone

Page 145: Things To Keep In Mind When Working In The World Of Responsive Design

HD TV + IE/Edge + Kinect

Page 146: Things To Keep In Mind When Working In The World Of Responsive Design

apple watch

Page 147: Things To Keep In Mind When Working In The World Of Responsive Design

apple watch

Page 148: Things To Keep In Mind When Working In The World Of Responsive Design

never leave a feature unusable on supported platforms

Page 149: Things To Keep In Mind When Working In The World Of Responsive Design

hover states

Page 150: Things To Keep In Mind When Working In The World Of Responsive Design

media queries + device detection + feature detection

Page 151: Things To Keep In Mind When Working In The World Of Responsive Design
Page 152: Things To Keep In Mind When Working In The World Of Responsive Design
Page 153: Things To Keep In Mind When Working In The World Of Responsive Design
Page 154: Things To Keep In Mind When Working In The World Of Responsive Design

google’s material design

Page 155: Things To Keep In Mind When Working In The World Of Responsive Design

facebook app

Page 156: Things To Keep In Mind When Working In The World Of Responsive Design
Page 157: Things To Keep In Mind When Working In The World Of Responsive Design
Page 158: Things To Keep In Mind When Working In The World Of Responsive Design
Page 159: Things To Keep In Mind When Working In The World Of Responsive Design

navigation structures

Page 160: Things To Keep In Mind When Working In The World Of Responsive Design
Page 161: Things To Keep In Mind When Working In The World Of Responsive Design
Page 162: Things To Keep In Mind When Working In The World Of Responsive Design

do you even need one?

Page 163: Things To Keep In Mind When Working In The World Of Responsive Design

seriously.

Page 164: Things To Keep In Mind When Working In The World Of Responsive Design

hiding menu items reduce visibility and

impact ux

Page 165: Things To Keep In Mind When Working In The World Of Responsive Design
Page 166: Things To Keep In Mind When Working In The World Of Responsive Design
Page 167: Things To Keep In Mind When Working In The World Of Responsive Design
Page 168: Things To Keep In Mind When Working In The World Of Responsive Design
Page 169: Things To Keep In Mind When Working In The World Of Responsive Design
Page 170: Things To Keep In Mind When Working In The World Of Responsive Design

don’t just make things fit

Page 171: Things To Keep In Mind When Working In The World Of Responsive Design

purpose + reason

Page 172: Things To Keep In Mind When Working In The World Of Responsive Design

rwd is more important than ever

Page 173: Things To Keep In Mind When Working In The World Of Responsive Design

mobile > desktop

Page 174: Things To Keep In Mind When Working In The World Of Responsive Design

mediocre experiences on mobile

Page 175: Things To Keep In Mind When Working In The World Of Responsive Design

watered down versions

Page 176: Things To Keep In Mind When Working In The World Of Responsive Design

no longer sufficient

Page 177: Things To Keep In Mind When Working In The World Of Responsive Design

harmful to business, conversions, etc

Page 178: Things To Keep In Mind When Working In The World Of Responsive Design

google ranking

Page 179: Things To Keep In Mind When Working In The World Of Responsive Design

algorithm updates that will have a “significant impact” on mobile search results worldwide for mobile searchers

Page 180: Things To Keep In Mind When Working In The World Of Responsive Design
Page 181: Things To Keep In Mind When Working In The World Of Responsive Design

google amp

Page 182: Things To Keep In Mind When Working In The World Of Responsive Design

accelerated mobile pages

Page 183: Things To Keep In Mind When Working In The World Of Responsive Design

html subset

Page 184: Things To Keep In Mind When Working In The World Of Responsive Design

built for performance

Page 185: Things To Keep In Mind When Working In The World Of Responsive Design
Page 186: Things To Keep In Mind When Working In The World Of Responsive Design
Page 187: Things To Keep In Mind When Working In The World Of Responsive Design
Page 188: Things To Keep In Mind When Working In The World Of Responsive Design

mobile only

Page 189: Things To Keep In Mind When Working In The World Of Responsive Design

<html ⚡>

Page 190: Things To Keep In Mind When Working In The World Of Responsive Design
Page 191: Things To Keep In Mind When Working In The World Of Responsive Design

facebook instant articles

Page 192: Things To Keep In Mind When Working In The World Of Responsive Design
Page 193: Things To Keep In Mind When Working In The World Of Responsive Design
Page 194: Things To Keep In Mind When Working In The World Of Responsive Design
Page 195: Things To Keep In Mind When Working In The World Of Responsive Design

incredibly fast

Page 196: Things To Keep In Mind When Working In The World Of Responsive Design

looking ahead + things i’m excited about

Page 197: Things To Keep In Mind When Working In The World Of Responsive Design

more amp + instant articles

Page 198: Things To Keep In Mind When Working In The World Of Responsive Design

css grid layout

Page 199: Things To Keep In Mind When Working In The World Of Responsive Design

new css spec

Page 200: Things To Keep In Mind When Working In The World Of Responsive Design

two dimensional content flow

Page 201: Things To Keep In Mind When Working In The World Of Responsive Design

early days

Page 202: Things To Keep In Mind When Working In The World Of Responsive Design

browser support is horrendous

Page 203: Things To Keep In Mind When Working In The World Of Responsive Design
Page 204: Things To Keep In Mind When Working In The World Of Responsive Design

experimental flags

Page 205: Things To Keep In Mind When Working In The World Of Responsive Design

gridbyexample.com

Page 206: Things To Keep In Mind When Working In The World Of Responsive Design

web components

Page 207: Things To Keep In Mind When Working In The World Of Responsive Design

modular elements

Page 208: Things To Keep In Mind When Working In The World Of Responsive Design

‘scoped’ css

Page 209: Things To Keep In Mind When Working In The World Of Responsive Design

html video element

Page 210: Things To Keep In Mind When Working In The World Of Responsive Design

polymer

Page 211: Things To Keep In Mind When Working In The World Of Responsive Design
Page 212: Things To Keep In Mind When Working In The World Of Responsive Design

element queries

Page 213: Things To Keep In Mind When Working In The World Of Responsive Design

css spec

Page 214: Things To Keep In Mind When Working In The World Of Responsive Design

js polyfill

Page 215: Things To Keep In Mind When Working In The World Of Responsive Design

VR

Page 216: Things To Keep In Mind When Working In The World Of Responsive Design

360 experiences

Page 217: Things To Keep In Mind When Working In The World Of Responsive Design

minority report

Page 218: Things To Keep In Mind When Working In The World Of Responsive Design
Page 219: Things To Keep In Mind When Working In The World Of Responsive Design

my hope

Page 220: Things To Keep In Mind When Working In The World Of Responsive Design

responsive web design

Page 221: Things To Keep In Mind When Working In The World Of Responsive Design

just web design

Page 222: Things To Keep In Mind When Working In The World Of Responsive Design

“Responsive Web Design is an approach to creating websites that can respond to all

known web browsing devices, with content delivery and UI interaction optimized to the greatest degree possible for all visitors.”

Page 223: Things To Keep In Mind When Working In The World Of Responsive Design

make emma proud

Page 224: Things To Keep In Mind When Working In The World Of Responsive Design

#oneLove@harismahmood89