Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Choosing the right frontend style guide workflow

Aaron Stanush
February 11, 2015

Choosing the right frontend style guide workflow

This talk explains the benefits of creating a living style guide for your web project, as well as provides three approaches for building and maintaining it.

Watch the video: http://4ktch.in/latin2015-style-guides

Presented at DrupalCon Latin America 2015

Aaron Stanush

February 11, 2015
Tweet

More Decks by Aaron Stanush

Other Decks in Technology

Transcript

  1. February 11, 2015 Choosing the right frontend style guide workflow

    for your project DrupalCon Latin America 2015
  2. Traditional style guides • PDF :( • Latest version? •

    Hard to distribute • Hard to edit / keep up to date • Impossible to document web interactivity
  3. 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
  4. Start with the basics • Branding assets • Color palette

    • Typography • Grid • UI components / Patterns • Page layouts
  5. “… 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
  6. Manual style guide tools • Static site generators • Jekyll

    - jekyllrb.com • Middleman - middlemanapp.com • Style guide frameworks • styleguides.io/tools.html
  7. 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
  8. 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
  9. Generated style guide Production Visual Design Prototypes Design / Build

    CSS + documentation syntax Generator magic! Style Guide
  10. 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!
  11. 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
  12. 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
  13. 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
  14. 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