bridging the gap between designers and developers at the guardian

85
Bridging the gap between developers and designers at the Guardian

Upload: kaelig-deloumeau-prigent

Post on 15-Jan-2015

3.234 views

Category:

Software


1 download

DESCRIPTION

There is often a vocabulary gap between designers an developers, who should aim towards a ubiquitous way of conversing about colours, typography, viewport sizes, or the responsive grid system of a digital product… To bridge this gap at the Guardian, we use a CSS pre-processor as a communication enabler through the abstractions it allows us to put in place. Talk given at re:revelop 2014 in Bournemouth on 22/08/2014: http://redevelop.io/

TRANSCRIPT

Page 1: Bridging the gap between designers and developers at the Guardian

Bridging the gap between developers and designers at

the Guardian

Page 2: Bridging the gap between designers and developers at the Guardian

Who is this conference for?

Page 3: Bridging the gap between designers and developers at the Guardian

Who is this conference for?

The ones who write code

Page 4: Bridging the gap between designers and developers at the Guardian

Who is this conference for?

The ones who write codeThe ones who don’t

Page 5: Bridging the gap between designers and developers at the Guardian

Who is this conference for?

The ones who write codeThe ones who don’t

The ones who use CSS pre-processors

Page 6: Bridging the gap between designers and developers at the Guardian

Who is this conference for?

The ones who write codeThe ones who don’t

The ones who use CSS pre-processorsThe ones who never heard of them

Page 7: Bridging the gap between designers and developers at the Guardian

Mars Climate Orbiter23 September 1999

Page 8: Bridging the gap between designers and developers at the Guardian

theguardian.com

Page 9: Bridging the gap between designers and developers at the Guardian

github.com/guardian/frontend

Page 10: Bridging the gap between designers and developers at the Guardian

github.com/guardian/frontend

66 contributors

Page 11: Bridging the gap between designers and developers at the Guardian

github.com/guardian/frontend

66 contributors~30 engineers touch HTML/CSS

Page 12: Bridging the gap between designers and developers at the Guardian

github.com/guardian/frontend

66 contributors~30 engineers touch HTML/CSS~25 000 lines of CSS

Page 13: Bridging the gap between designers and developers at the Guardian

github.com/guardian/frontend

66 contributors~30 engineers touch HTML/CSS~25 000 lines of CSSRelease cycle ~4 times per day

Page 14: Bridging the gap between designers and developers at the Guardian
Page 15: Bridging the gap between designers and developers at the Guardian

Product Manager

Designers

Engineers

Editorial

UX Designer

Page 16: Bridging the gap between designers and developers at the Guardian
Page 17: Bridging the gap between designers and developers at the Guardian

Idea

Page 18: Bridging the gap between designers and developers at the Guardian

Idea

Page 19: Bridging the gap between designers and developers at the Guardian

Prototype

Idea

Page 20: Bridging the gap between designers and developers at the Guardian

Prototype

Idea

Page 21: Bridging the gap between designers and developers at the Guardian

Prototype

Idea

Test

Page 22: Bridging the gap between designers and developers at the Guardian

Prototype

Idea Test

Page 23: Bridging the gap between designers and developers at the Guardian

@kaelig

Our context

Page 24: Bridging the gap between designers and developers at the Guardian

@kaelig

Lots of contributors

Our context

Page 25: Bridging the gap between designers and developers at the Guardian

@kaelig

Lots of contributorsDifferent skill sets

Our context

Page 26: Bridging the gap between designers and developers at the Guardian

@kaelig

Lots of contributorsDifferent skill sets

People speaking different languages

Our context

Page 27: Bridging the gap between designers and developers at the Guardian

@kaelig

Lots of contributorsDifferent skill sets

People speaking different languages

We release early and often

Our context

Page 28: Bridging the gap between designers and developers at the Guardian

@kaelig

Lots of contributorsDifferent skill sets

People speaking different languages

We release early and oftenWe want to keep it that way

Our context

Page 29: Bridging the gap between designers and developers at the Guardian

Developer tools

Scala

Play!

GruntSass

RequireJS

Bower

AWS

Node.jsSelenium

WebdriverRuby

TeamCity

GitHub

PhantomJSAngular

Beer

Page 30: Bridging the gap between designers and developers at the Guardian

Developer tools

Scala

Play!

GruntSass

RequireJS

Bower

AWS

Node.jsSelenium

WebdriverRuby

TeamCity

GitHub

PhantomJSAngular

Beer

Page 31: Bridging the gap between designers and developers at the Guardian

sass-lang.com

@kaelig

Page 32: Bridging the gap between designers and developers at the Guardian

The colour for the article’s headline is “light grey”

@kaelig

Page 33: Bridging the gap between designers and developers at the Guardian
Page 34: Bridging the gap between designers and developers at the Guardian
Page 35: Bridging the gap between designers and developers at the Guardian

@kaelig

Page 36: Bridging the gap between designers and developers at the Guardian

$c-brandBlue: #005689;

@kaelig

Page 37: Bridging the gap between designers and developers at the Guardian

$c-brandBlue: #005689;.nav { background: $c-brandBlue; }

@kaelig

Page 38: Bridging the gap between designers and developers at the Guardian

$c-brandBlue: #005689;.nav { background: $c-brandBlue; }

@kaelig

.nav { background: #005689; }

Page 39: Bridging the gap between designers and developers at the Guardian

Takeaways

@kaelig

Page 40: Bridging the gap between designers and developers at the Guardian

Takeaways

• Code is a communication tool (here, thanks to variables)

@kaelig

Page 41: Bridging the gap between designers and developers at the Guardian

Takeaways

• Code is a communication tool (here, thanks to variables)

• A pre-processor avoids constant copy and pasting of specific values

@kaelig

Page 42: Bridging the gap between designers and developers at the Guardian

Breakpoints

@kaelig

Page 43: Bridging the gap between designers and developers at the Guardian

@kaelig

Page 44: Bridging the gap between designers and developers at the Guardian

@media (min-width: 37.5em) {}

@kaelig

Page 45: Bridging the gap between designers and developers at the Guardian

@media (min-width: 37.5em) {}

@media (min-width: $tablet) {}

@kaelig

Page 46: Bridging the gap between designers and developers at the Guardian

@media (min-width: 37.5em) {}

@media (min-width: $tablet) {}

@include mq(tablet) {}

@kaelig

Page 47: Bridging the gap between designers and developers at the Guardian

@media (min-width: 37.5em) {}

@media (min-width: $tablet) {}

@include mq(tablet) {}@include mq(tablet, desktop) {}

@kaelig

Page 48: Bridging the gap between designers and developers at the Guardian

@media (min-width: 37.5em) {}

@media (min-width: $tablet) {}

@include mq(tablet) {}@include mq(tablet, desktop) {}

@include mq($to: tablet) {}

@kaelig

Page 49: Bridging the gap between designers and developers at the Guardian

sass-mq

• Reusable @media query abstraction • A breakpoint has a name, instead of

being called by its width • Simplifies cross-browser support (IE8)

git.io/sass-mq

@kaelig

Page 50: Bridging the gap between designers and developers at the Guardian

CSS

.nav { background: #005689; } @media all and (min-width: 37.5em) { .nav { background: transparent; } }

sass-mq: example

Sass.nav { background: $c-brandBlue; ! @include mq($from: tablet) { background: transparent; } }

Page 51: Bridging the gap between designers and developers at the Guardian

sass-mq: example

Sass

CSS

.nav { background: $c-brandBlue; ! @include mq($from: tablet) { background: transparent; } }

.nav { background: #005689; } @media all and (min-width: 37.5em) { .nav { background: transparent; } }

Page 52: Bridging the gap between designers and developers at the Guardian

Naming breakpoints

$mq-breakpoints: ( mobile: 320px, tablet: 740px, desktop: 980px, wide: 1300px );

@kaelig

Page 53: Bridging the gap between designers and developers at the Guardian

Naming breakpoints

mobile vs S tablet vs M

desktop vs L wide vs XL

@kaelig

Page 54: Bridging the gap between designers and developers at the Guardian

Takeaways

@kaelig

Page 55: Bridging the gap between designers and developers at the Guardian

Takeaways

• Technically complex things can be made much simpler looking

@kaelig

Page 56: Bridging the gap between designers and developers at the Guardian

Takeaways

• Technically complex things can be made much simpler looking

• Taking time to code small tools can actually be super productive

@kaelig

Page 57: Bridging the gap between designers and developers at the Guardian

The grid

@kaelig

Page 58: Bridging the gap between designers and developers at the Guardian
Page 59: Bridging the gap between designers and developers at the Guardian
Page 60: Bridging the gap between designers and developers at the Guardian

4 to 16 60px columns

Gutter: 20px

Outer margins:

< 480px: 10px

>= 480px: 20px

Page 61: Bridging the gap between designers and developers at the Guardian

A column, a gutter… How much is that in pixels?

@kaelig

Page 62: Bridging the gap between designers and developers at the Guardian

.element { width: 220px; } @media (min-width: 56.25em) { .element { width: 540px; } }

3 columns by default, then 7 columns on desktops

Page 63: Bridging the gap between designers and developers at the Guardian

https://github.com/guardian/guss-grid-system @kaelig

Page 64: Bridging the gap between designers and developers at the Guardian

.element { width: gs-span(3); } @include mq(desktop) { .element { width: gs-span(7); } }

3 columns by default, then 7 columns on desktops

Page 65: Bridging the gap between designers and developers at the Guardian

Basing breakpoints on the grid

@kaelig

Page 66: Bridging the gap between designers and developers at the Guardian

$right-column: gs-span(4); $left-column: gs-span(2); // Grows to 3 columns on wide viewports $left-column-wide: gs-span(3); !$mq-breakpoints: ( mobile: gs-span(4) + $gs-gutter, // 320px tablet: gs-span(9) + $gs-gutter*2, // 740px desktop: gs-span(12) + $gs-gutter*2, // 980px wide: gs-span(16) + $gs-gutter*2, // 1300px ! // Tweakpoints mobileLandscape: gs-span(6) + $gs-gutter, // 480px ! // Content rightCol: gs-span(11) + $gs-gutter*2, // 900px leftCol: gs-span(13) + $gs-gutter*2, // 1060px ! // Facia faciaLeftCol: gs-span(14) + $gs-gutter*2 // 1140px );

@kaelig

Page 67: Bridging the gap between designers and developers at the Guardian

Takeaways

@kaelig

Page 68: Bridging the gap between designers and developers at the Guardian

Takeaways

• Machines can (must) do maths, so you don’t have to

@kaelig

Page 69: Bridging the gap between designers and developers at the Guardian

Takeaways

• Machines can (must) do maths, so you don’t have to

• The sum of the parts does not equal the whole (grid system + breakpoints)

@kaelig

Page 70: Bridging the gap between designers and developers at the Guardian
Page 71: Bridging the gap between designers and developers at the Guardian

16px/20px normal14px/18px normal

14px/18px normal

14px/18px normal

14px/18px normal

16px/20px normal

32px/36px normal

32px/36px normal

text sans 12px/16px

text sans 12px/16px

20px/24px normal

20px/28px bolder

Page 72: Bridging the gap between designers and developers at the Guardian

? ? ?

@kaelig

Page 73: Bridging the gap between designers and developers at the Guardian
Page 74: Bridging the gap between designers and developers at the Guardian
Page 75: Bridging the gap between designers and developers at the Guardian

CSS

Type scale example

Sass.element { font-size: 16px; line-height: 20px; font-family: "Guardian Egyptian Headline", Georgia, serif; font-weight: 900; }

.element { @include fs-header(1); }

Page 76: Bridging the gap between designers and developers at the Guardian

CSS

Type scale example

Sass

.element { font-size: 16px; line-height: 20px; font-family: "Guardian Egyptian Headline", Georgia, serif; font-weight: 900; }

.element { @include fs-header(1); }

Page 77: Bridging the gap between designers and developers at the Guardian

16px/20px normal14px/18px normal

14px/18px normal

14px/18px normal

14px/18px normal

16px/20px normal

32px/36px normal

32px/36px normal

text sans 12px/16px

text sans 12px/16px

20px/24px normal

20px/28px bolder

Page 78: Bridging the gap between designers and developers at the Guardian

Headline 2Headline 1

Headline 1

Headline 1

Headline 2

Headline 6

Headline 6

Text Sans 1

Text Sans 1

Headline 3

Header 3

Headline 1

Page 79: Bridging the gap between designers and developers at the Guardian

Isn’t this putting a cap on creativity?

Page 80: Bridging the gap between designers and developers at the Guardian

Takeaways

@kaelig

Page 81: Bridging the gap between designers and developers at the Guardian

Takeaways

• When no naming convention is in place, you can get together and set a new one

@kaelig

Page 82: Bridging the gap between designers and developers at the Guardian

Takeaways

• When no naming convention is in place, you can get together and set a new one

• Putting design principles into in code can improve UI consistency

@kaelig

Page 83: Bridging the gap between designers and developers at the Guardian

Prototype

Idea Test

@kaelig

Designsystem

Designsystem

Designsystem

Page 84: Bridging the gap between designers and developers at the Guardian

Designsystem

@kaelig

Prototype

Idea Test

Page 85: Bridging the gap between designers and developers at the Guardian

Bridge the gap between developers and designers

Credits: Mars Climate Orbiter 2 — By NASA/JPL/Corby Waste [Public domain], via Wikimedia Commons — http://commons.wikimedia.org/wiki/File

%3AMars_Climate_Orbiter_2.jpg Hipster — Cámara espía — https://flic.kr/p/cXMuEd

Mug — slavik_V — https://flic.kr/p/9WgM9D swiss style grid sample — Filipe Varela — https://flic.kr/p/4xLDb1

Gene Wilburn — A Splash of Colour — https://flic.kr/p/5VK8kv Glasses designed by Okan Benn from the Noun Project

Document designed by Jamison Wieser from the Noun Project

@kaelig