Slide 1

Slide 1 text

February 11, 2015 Choosing the right frontend style guide workflow for your project DrupalCon Latin America 2015

Slide 2

Slide 2 text

Listen to this talk: 4ktch.in/latin2015-style-guides Presented at

Slide 3

Slide 3 text

Aaron Stanush Creative Director and Partner @aaronstanush [email protected]

Slide 4

Slide 4 text

Traditional style guides

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Links!

Slide 12

Slide 12 text

Links :(

Slide 13

Slide 13 text

2012: starbucks.com goes responsive

Slide 14

Slide 14 text

Starbucks style guide

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Typography Buttons Grid Layouts Navigation Media Forms Starbucks style guide

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

You want a living style guide

Slide 19

Slide 19 text

Why create a living style guide?

Slide 20

Slide 20 text

Traditional style guides • PDF :( • Latest version? • Hard to distribute • Hard to edit / keep up to date • Impossible to document web interactivity

Slide 21

Slide 21 text

Advantages to creating a living style guide

Slide 22

Slide 22 text

Improves team-wide communication

Slide 23

Slide 23 text

bradfrost.com/blog/post/interface-inventory Provides design consistency

Slide 24

Slide 24 text

Patterns + Reusability = Faster build times

Slide 25

Slide 25 text

Living style guides • Improve cross-team communication • Provide design consistency • Avoid CSS bloat, encourages reusability • Faster build times • Made with actual HTML/CSS + Interactivity • Available online, editable • Version control

Slide 26

Slide 26 text

What’s in a style guide?

Slide 27

Slide 27 text

Branding

Slide 28

Slide 28 text

Writing

Slide 29

Slide 29 text

Design Language

Slide 30

Slide 30 text

Coding standards

Slide 31

Slide 31 text

Component / Pattern / UI library

Slide 32

Slide 32 text

Choose your own adventure

Slide 33

Slide 33 text

Start with the basics • Branding assets • Color palette • Typography • Grid • UI components / Patterns • Page layouts

Slide 34

Slide 34 text

“… it’s a one-stop place for the entire team—from product owners and producers to designers and developers—to reference when discussing site changes and iterations.” — Susan Robertson alistapart.com/article/creating-style-guides

Slide 35

Slide 35 text

Approaches

Slide 36

Slide 36 text

Style guides approaches Manual Generated Hybrid

Slide 37

Slide 37 text

Production Visual Design Prototypes Manual style guide Style Guide Custom build or framework Design / Build

Slide 38

Slide 38 text

wp.style.fourkitchens.com World Pulse style guide worldpulse.com

Slide 39

Slide 39 text

texasexes.style.fourkitchens.com Texas Exes style guide github.com/fourkitchens/texasexes-style-guide

Slide 40

Slide 40 text

Code for America, pattern library as a deliverable style.codeforamerica.org

Slide 41

Slide 41 text

Manual style guide tools • Static site generators • Jekyll - jekyllrb.com • Middleman - middlemanapp.com • Style guide frameworks • styleguides.io/tools.html

Slide 42

Slide 42 text

Keeping your style guide in sync • Keep Sass/asset directories identical to production • Git subtree merging • Bower • github.com/north/generator-Style-Prototype#via-bower • Advanced: Make your style guide a services that your websites and apps can use

Slide 43

Slide 43 text

When to use the manual approach • Doing design upfront is part of your process • Need to start design before you know everything you’re building • Development resources aren’t available • Design is the deliverable

Slide 44

Slide 44 text

Generated style guide Production Visual Design Prototypes Design / Build CSS + documentation syntax Generator magic! Style Guide

Slide 45

Slide 45 text

What’s a generator? 1. Write your Sass 2. Add documentation as comments 3. Run the generator app in the command line 4. You’ve got a style guide! Let’s do an example with kss-node!

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

main title Description Chapter # section title markup Classes, states Subchapter # Styles

Slide 48

Slide 48 text

github.com/kss-node/kss-node $ kss-node 1. Parses your stylesheets 2. Outputs static HTML files in /styleguide

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

KSS-node + Drupal amsterdam2014.drupal.org/session/styleguide-driven-development-new-web-development

Slide 51

Slide 51 text

vinspee.me/style-guide-guide Lots of generators to choose from alistapart.com/blog/post/style-guide-generator-roundup

Slide 52

Slide 52 text

When to use the Generator approach • The project doesn’t afford a lot of time for upfront design • You want to design against the production environment/CMS • You’re only doing the implementation • You don’t want to maintain a separate/custom system for the style guide

Slide 53

Slide 53 text

CSS / JS Development/ Production Style Guide Hybrid style guide Component markup / HTML

Slide 54

Slide 54 text

cognition.happycog.com/article/the-scoop-on-our-benjerry.com-style-guide Ben & Jerry’s style guide

Slide 55

Slide 55 text

When to use the Hybrid approach • You don’t necessarily want the documentation inside the Sass/CSS itself • You need more flexibility in your environments • You need more flexibility in how designers and developers work together

Slide 56

Slide 56 text

…and if you want to take your style guide to the next level

Slide 57

Slide 57 text

medium.com/salesforce-ux/living-design-system-3ab1f2280ef7 sfdc-styleguide.herokuapp.com ianfeather.co.uk/a-maintainable-style-guide rizzo.lonelyplanet.com/styleguide

Slide 58

Slide 58 text

What if I want to add a style guide for my existing site?

Slide 59

Slide 59 text

Creating style guides for existing sites • Hybrid (easier): Create a style guide with your site’s components and link it to your production CSS • Generated (harder): Choose a generator, then go through your production Sass and add the appropriate structured documentation syntax more time consuming, but more sustainable

Slide 60

Slide 60 text

Best practices

Slide 61

Slide 61 text

Best practices • Put it online and easy to find • Make it for everyone • Make it part of your workflow • Keep things general, aim for reuse • Make maintenance easy (Keep it up to date!) More: bradfrost.com/blog/post/style-guide-best-practices

Slide 62

Slide 62 text

Resources

Slide 63

Slide 63 text

Articles Books Podcasts Talks Tools Examples styleguides.io

Slide 64

Slide 64 text

github.com/maban/styleguides

Slide 65

Slide 65 text

Style Guide Podcast styleguides.io/podcast/index.html

Slide 66

Slide 66 text

atomicdesign.bradfrost.com

Slide 67

Slide 67 text

4ktch.in/ams-style-guides

Slide 68

Slide 68 text

Thank you!