Improving the Responsive Web Design Process in 2016 Cristina - - PowerPoint PPT Presentation

improving the responsive web design process in 2016
SMART_READER_LITE
LIVE PREVIEW

Improving the Responsive Web Design Process in 2016 Cristina - - PowerPoint PPT Presentation

Improving the Responsive Web Design Process in 2016 Cristina Chumillas DESIGNER AND FRONTEND DEVELOPER AT YMBRA ckrina @chumillas Mobile to overtake fixed Internet access by 2014 2008 by Mary Meeker Modern Design processes


slide-1
SLIDE 1

Improving the Responsive Web Design Process in 2016

slide-2
SLIDE 2

@chumillas

Cristina Chumillas

DESIGNER AND FRONTEND DEVELOPER AT YMBRA

ckrina

slide-3
SLIDE 3

“Mobile to overtake fixed Internet access by 2014”

2008 by Mary Meeker

slide-4
SLIDE 4

@chumillas #DrupalCampEs

Modern Design processes

Content-First Mobile-First Design

slide-5
SLIDE 5

@chumillas #DrupalCampEs

Modern Design processes

Static compositions Content-First Mobile-First Design

slide-6
SLIDE 6

@chumillas #DrupalCampEs

Modern Design processes

Content-First Mobile-First Design Responsive prototypes

Get into the browser quickly!

slide-7
SLIDE 7

@chumillas #DrupalCampEs

Modern Design processes

Content-First Mobile-First Design Responsive prototypes Lorem ipsum

slide-8
SLIDE 8

@chumillas #DrupalCampEs

Modern Design processes

Content-First Mobile-First Design Responsive prototypes Real content (extreme cases)

slide-9
SLIDE 9

@chumillas #DrupalCampEs

Atomic Design and components

Modern Design processes

Content-First Mobile-First Design Responsive prototypes Real content (extreme cases)

slide-10
SLIDE 10

@chumillas #DrupalCampEs

Performance

slide-11
SLIDE 11

@chumillas #DrupalCampEs

Performance Performance = UX

4”

16%

64% smartphone users page weight 2015

2,2Mb

average

slide-12
SLIDE 12

@chumillas #DrupalCampEs

Performance

5KB HTML 125KB Images 7KB CSS 33KB JS 20KB VIDEO 10KB Fonts

2s Fast 3G

(1.6Mb)

200KB

http://www.performancebudget.io

We have to decide the performance budget

slide-13
SLIDE 13

@chumillas #DrupalCampEs

Performance Performance = UX

“Perceived performance: your most critical metric” Immediate User-flow (human-interaction) Attention span 1s 1-5s 5-10s

slide-14
SLIDE 14

@chumillas #DrupalCampEs

Performance

238ms 300ms 452ms 497ms 651ms

HTML logo header image

  • ther images

footer background

  • ther JS

CSS jQuery Modernizr

slide-15
SLIDE 15

@chumillas #DrupalCampEs

Performance

687ms 825ms 895ms 954ms 1.25ms

  • ther images

footer background

  • ther JS

3rd party stuff (Analytics, Ads, etc) fonts

slide-16
SLIDE 16

@chumillas #DrupalCampEs

slide-17
SLIDE 17

@chumillas #DrupalCampEs

Performance

Optimize image files Concatenate text files Minimify text files Compress text files Cache everywhere

slide-18
SLIDE 18

@chumillas #DrupalCampEs

CSS structuring and optimization

slide-19
SLIDE 19

@chumillas #DrupalCampEs

CSS structuring and optimization

CSS Methodologies CSS Methodologies

· OOCSS · BEM · SMACSS

slide-20
SLIDE 20

@chumillas #DrupalCampEs

Reuse CSS

CSS structuring and optimization

CSS Methodologies

slide-21
SLIDE 21

@chumillas #DrupalCampEs

Reuse CSS

Reduce page size

CSS structuring and optimization

CSS Methodologies

slide-22
SLIDE 22

@chumillas #DrupalCampEs

Reuse CSS

Reduce page size Increase page rendering speed

CSS structuring and optimization

CSS Methodologies

slide-23
SLIDE 23

@chumillas #DrupalCampEs

Reuse CSS Faster CSS rendering

CSS structuring and optimization

CSS Methodologies

.element-name--last {} .box:nth-last-child(-n+1) .title {}

slide-24
SLIDE 24

@chumillas #DrupalCampEs

Reuse CSS Faster CSS rendering Large scale ready

Helps you figure out what your design is made of. Helps you getting started in a project.

CSS structuring and optimization

CSS Methodologies

slide-25
SLIDE 25

#DrupalCampEs

Living document of code that details all the elements of your site.

CSS structuring and optimization

Living Styleguides

slide-26
SLIDE 26

@chumillas #DrupalCampEs

Faster build times for new sections and pages Standardize the CSS, keeping it small and quick to load Design consistency is easier to maintain

CSS structuring and optimization

Living Styleguides

slide-27
SLIDE 27

@chumillas #DrupalCampEs

Fixed-pixel vs relative units

slide-28
SLIDE 28

@chumillas #DrupalCampEs

Fixed-pixel vs relative units

Layouts benefit from relative units.

16px 1em 1rem

slide-29
SLIDE 29

@chumillas #DrupalCampEs

Fixed-pixel vs relative units

1.1 x the base 16px 17,6px (1.1 x the previous) 19,36px (1.1 x the previous) 1.1 x the base 1.1 x the base

em rem

slide-30
SLIDE 30

@chumillas #DrupalCampEs

Viewport Sized Units

vw vh vmax

slide-31
SLIDE 31
slide-32
SLIDE 32

@chumillas #DrupalCampEs

Responsive Typography

slide-33
SLIDE 33

@chumillas #DrupalCampEs

Responsive Typography

User’s distance from the screen

slide-34
SLIDE 34

@chumillas #DrupalCampEs

Responsive Typography

Title 14px 16px 22-60 rems 40-80 characters

Occusapicim dit doluptassum que labo. Em sam ilictumPore quisqui officitaspit volenis eturio est venim ipis ex eturepe llandit eum, untium, quostot aturia sim sam corendanihit fugianis delitio sandae volupta quate re nos aut et dolendi tatium, offic te nos est aliat que perum et eaquatu riberibus mo cus.

  • Peruntio. Nequiam et quo eum lab ipsa

cusantiberro maxim faccus am et voluptatem voluptae pa cuptas et quae simagnim facienis et et ese pa sanis aut autem asi unt ommodis aut fugitasped qui omnimag nisimil laborum sunt adit, voluptatur rero opti aris aut rerum eos eatint, vitatem. Rovid quid ma aut maximi, oditat lamus imusdantiis ex excessi tatque poriatur?

slide-35
SLIDE 35

@chumillas #DrupalCampEs

Responsive Typography

5% 10KB

200KB 38KB ttf 18KB woff2

Open Sans Regular

slide-36
SLIDE 36

@chumillas #DrupalCampEs

Responsive Typography

FOUT FOIT

“Flash of Unstyled Text” “Flash of Invisible Text”

Browsers used to display a fallback font in the font stack until the custom one loaded. They started to detect if text was set in a custom font that hasn’t loaded yet, and made it invisible until the font did load

FOUT, FOIT

slide-37
SLIDE 37

@chumillas #DrupalCampEs

Responsive Typography

Readability

Correct font size depending on container

slide-38
SLIDE 38

@chumillas #DrupalCampEs

Responsive Typography

Readability Use less fonts

Correct font size depending on container Do you need them?

slide-39
SLIDE 39

@chumillas #DrupalCampEs

slide-40
SLIDE 40

@chumillas #DrupalCampEs

Responsive Typography

Readability Use less fonts Use modern font formats

Correct font size depending on container Do you need them? Reduce the page weight

slide-41
SLIDE 41

@chumillas #DrupalCampEs

Images

slide-42
SLIDE 42

@chumillas #DrupalCampEs

Images

JPG PNG 24-bit PNG 8-bit

slide-43
SLIDE 43

@chumillas #DrupalCampEs

Images

Browsers request images asynchronously Images too big for the device website bytes

61%

slide-44
SLIDE 44

@chumillas #DrupalCampEs

Responsive images

The aim is to deliver the highest quality image supported and nothing more.

slide-45
SLIDE 45

@chumillas #DrupalCampEs

Responsive images

Scaled images

<img srcset=”image-large.jpg 1920w, image-medium.jpg 960w, image-small.jpg 480w” sizes=”50vw” src=”quilt_2/detail/medium.jpg” alt=”Detail text.”>

slide-46
SLIDE 46

@chumillas #DrupalCampEs

Responsive images

<picture title=”Image title”> <source srcset=”image-big.jpg 1x, image-big2x.jpg 2x” media=”(min-width: 0px) and (max-width: 29.99em)”> <source srcset=”image-big.jpg 1x, image-big2x.jpg 2x” media=”(min-width: 30em)”> <img srcset=”image-big.jpg 180w”> </picture>

Adapted images

slide-47
SLIDE 47

@chumillas #DrupalCampEs

Responsive images

Adapted images

slide-48
SLIDE 48

@chumillas #DrupalCampEs

Responsive images

Non Drupal solutions ReSrc, thumbr.io, responsive.io Cloudinary Picturefill Scaling based on the targeted end result Scaling based on url. Scaling based on media-queries. ...

slide-49
SLIDE 49

@chumillas #DrupalCampEs

SVGs

Scaling based on the targeted end result Scales to any size without losing clarity Looks great on retina displays Design control like interactivity and filters Scalable Vector Graphics Future-proof Easy to make and edit Manipulatable with CSS & JS * Highly compressible

slide-50
SLIDE 50

@chumillas #DrupalCampEs

Asynchronous loading

slide-51
SLIDE 51

@chumillas #DrupalCampEs

Asynchronous loading

Connection Setup Starts printing Request Sent Waiting response Download

Default behavior

HTML CSS JS 1 JS 2 JS 2 JS 3 JS 3

slide-52
SLIDE 52

@chumillas #DrupalCampEs

Asynchronous loading

Default behavior

<html> <head> <link rel=”stylesheet” href=”styles.css”/> <script src=”javascript.js”></script> </head> <body> <div>Page content</div> </body> </html>

slide-53
SLIDE 53

@chumillas #DrupalCampEs

Asynchronous loading

Async

<html> <head> <link rel=”stylesheet” href=”styles.css”/> <script src=”javascript.js” async></script> </head> <body> <div>Page content</div> </body> </html>

slide-54
SLIDE 54

@chumillas #DrupalCampEs

While the JavaScript file is loading, parsing the HTML document can continue JS execution no longer has to wait for CSS You can’t guarantee the order of JS execution The script shouldn’t use document.write()

The document parser doesn’t pause while the script is loading, the browser has no idea where any content added by document.write() should go.

Doesn’t block the DOMContentLoaded event

Asynchronous loading

Async

i i

slide-55
SLIDE 55

@chumillas #DrupalCampEs

Asynchronous loading

Defer

<script src=”javascript.js” defer></script>

Deferred scripts are executed only after the HTML page has been parsed It has the potential to interfere with the rendering of the page Deferred scripts will execute in the order they appear in the document ou can’t guarantee the order of JS execution async has priority

i i

slide-56
SLIDE 56

@chumillas #DrupalCampEs <html> <head> <link rel=”stylesheet” href=”styles.css”/> <script src=”javascript.js”></script> <script src=”javascript.js” async></script> <script> /* JavaScript source code goes here... */ </script> </head> <body> <div>Page content</div> <script src=”javascript.js”></script> </body> </html>

Asynchronous loading

slide-57
SLIDE 57

@chumillas #DrupalCampEs

Proxy-based browsers

slide-58
SLIDE 58

@chumillas #DrupalCampEs

Proxy-based browsers

Reduce bandwidth usage by compressing resources

  • n a proxy server

before sending it to the client browser.

India, Indonesia, Nigeria, Bangladesh and South Africa

Opera Mini users

250

million

slide-59
SLIDE 59

@chumillas #DrupalCampEs

Use SVG rather than icon fonts Style your HTML with CSS Test your site without JavaScript Make your site performant Test in Opera Mini

Proxy-based browsers

slide-60
SLIDE 60

@chumillas #DrupalCampEs

Progressive enhancement

Basic content and functionality of a web page to any browser or Internet connection Enhanced version advanced browser software or greater bandwidth

Proxy-based browsers

Accessibility

slide-61
SLIDE 61

@chumillas #DrupalCampEs

Beyond the Mouse

Touch and keyboard events

slide-62
SLIDE 62

@chumillas #DrupalCampEs

Beyond the mouse

  • Be accessible in browsers where a mouse pointer may not exist.
  • Don’t assume touch will be used, but design as if it will be.

Save hover for shortcuts Keep in touch Gestures: don’t override them

slide-63
SLIDE 63

@chumillas #DrupalCampEs

Beyond the mouse

Save hover for shortcuts Keep in touch

57x45px safe space thumb finger 72x45px

slide-64
SLIDE 64

@chumillas #DrupalCampEs

Beyond the mouse

Save hover for shortcuts Keep in touch Gestures: don’t override them

slide-65
SLIDE 65

@chumillas #DrupalCampEs

RWD patterns and Progressively Disclosure

slide-66
SLIDE 66

@chumillas #DrupalCampEs

RWD Patterns Navigation patterns UI patterns Grid patterns

slide-67
SLIDE 67

@chumillas #DrupalCampEs

slide-68
SLIDE 68

Thank you!

@chumillas