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

Responsive Design Patterns for an Evolving Web

Responsive Design Patterns for an Evolving Web

Overview
Style guides, pattern libraries, and design systems are becoming more commonplace. As the web continues to mature older design patterns, even though they are widely understood, no longer work well for a multi-device web. Building modular, reusable patterns will help designs function on a wider group of devices.

Four Things Audience Members Will Learn
1. Basic guidelines for creating modular design patterns
2. Updated age-old design patterns for the evolving web
3. New responsive design patterns that solve complex, multi-device design problems
4. How to leverage Sass and PostCSS when creating design patterns

Examples:
https://codepen.io/collection/DbrpKV/#

Bermon Painter

June 04, 2016
Tweet

More Decks by Bermon Painter

Other Decks in Technology

Transcript

  1. PATTERNS & DESIGN SYSTEMS The foundation of repeatable interactions that

    when combined create rich and complex systems.
  2. BENEFITS A useful tool to use when breaking down a

    user interface into it’s most modular pieces, instead of thinking about things as a series of disconnected pages.
  3. HTML /assets /images /content /layout /fonts /javascript /libs /modules module-name.js

    /testing module-name.spec /sass /base /helpers /modules module-name.scss /setup /themes /theme-name module-name.scss CONVENTIONS Folder Structure
  4. Ullamcorper Adipiscing Venenatis Consectetur Tortor Curabitur blandit tempus porttitor. Aenean

    eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.
  5. Ullamcorper Adipiscing Venenatis Consectetur Tortor Curabitur blandit tempus porttitor. Aenean

    eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.
  6. Ullamcorper Adipiscing Venenatis Consectetur Tortor Curabitur blandit tempus porttitor. Aenean

    eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.
  7. Ullamcorper Adipiscing Venenatis Consectetur Tortor Curabitur blandit tempus porttitor. Aenean

    eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.
  8. Ullamcorper Adipiscing Venenatis Consectetur Tortor Curabitur blandit tempus porttitor. Aenean

    eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.
  9. Ullamcorper Adipiscing Venenatis Consectetur Tortor Curabitur blandit tempus porttitor. Aenean

    eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.
  10. HTML <main class="panes"> <section class="pane"> <img class="pane-image" src="image.png" /> <h2

    class="pane-title">Title</h2> <p class="pane-content">Content...</p> </section> <section class="pane"> <img class="pane-image" src="image.png" /> <h2 class="pane-title">Title</h2> <p class="pane-content">Content...</p> </section> </main> Venenatis Fringilla Justo Sem Amet Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Venenatis Fringilla Justo Sem Amet Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
  11. CSs .panes { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content:

    center; height:100vh; text-align: center; width: 100%; } Venenatis Fringilla Justo Sem Amet Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Venenatis Fringilla Justo Sem Amet Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
  12. CSs .panes { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content:

    center; height:100vh; text-align: center; width: 100%; } .pane { display: flex; flex-direction: column; justify-content: center; width: 100%; } Venenatis Fringilla Justo Sem Amet Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Venenatis Fringilla Justo Sem Amet Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
  13. HTML html, body { height: 100%; } body { display:

    flex; flex-direction: column; }
  14. HTML html, body { height: 100%; } body { display:

    flex; flex-direction: column; } .container { display: flex; flex: 1; }
  15. HTML html, body { height: 100%; } body { display:

    flex; flex-direction: column; } .container { display: flex; flex: 1; } .content { flex: 1; }
  16. HTML html, body { height: 100%; } body { display:

    flex; flex-direction: column; } .container { display: flex; flex: 1; } .content { flex: 1; } .navigation { flex-basis: 30%; order: -1; }
  17. HTML html, body { height: 100%; } body { display:

    flex; flex-direction: column; } .container { display: flex; flex: 1; } .content { flex: 1; } .navigation { flex-basis: 30%; order: -1; } .sidebar { flex-basis: 20%; }
  18. HTML html, body { height: 100%; } body { display:

    flex; flex-direction: column; } .container { display: flex; flex: 1; } .content { flex: 1; } .navigation { flex-basis: 30%; order: -2; } .sidebar { flex-basis: 20%; order: -1; }
  19. CSs html, body { height: 100%; } body { display:

    flex; flex-direction: column; } .container { display: flex; flex: 1; flex-direction: column; } .content, .sidebar { flex: 1; } .sidebar { order: -1; }
  20. CSs html, body { height: 100%; } body { display:

    flex; flex-direction: column; } .container { display: flex; flex: 1; flex-direction: column; } .content, .sidebar { flex: 1; } .sidebar { order: -1; } @media screen and (min-width: 600px) { .container { flex-direction: row-reverse; } .content { flex-basis: 30%; } }
  21. CSS HTML <header class="masthead"></header> <main class="container"> <article class="content"><article> <nav class="navigation"></nav>

    <aside class="sidebar"></aside> </main> <footer class="footer"></footer> .container { display: flex; flex: 1; } .content { flex: 1; } .navigation { flex-basis: 30%; order: -1; } .sidebar { flex-basis: 20%; } 1 2 3 DOM ORDER
  22. CSS HTML <header class="masthead"></header> <main class="container"> <article class="content"><article> <nav class="navigation"></nav>

    <aside class="sidebar"></aside> </main> <footer class="footer"></footer> .container { display: flex; flex: 1; } .content { flex: 1; } .navigation { flex-basis: 30%; order: -1; } .sidebar { flex-basis: 20%; } 2 1 3 VISUAL ORDER
  23. CSS HTML <header class="masthead"></header> <main class="container"> <article class="content"><article> <nav class="navigation"></nav>

    <aside class="sidebar"></aside> </main> <footer class="footer"></footer> .container { display: flex; flex: 1; } .content { flex: 1; } .navigation { flex-basis: 30%; order: -1; } .sidebar { flex-basis: 20%; } 1 2 3 TAB ORDER
  24. HTML <nav class="toolbars"> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Dashboard</a> </li>

    <li class="toolbar-item"> <a href="toolbar-link">Loans</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Budget</a> </li> </ul> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Settings</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Logout</a> </li> </ul> </nav> Dashboard Loans BudgeT SETTINGS LOGOUT
  25. HTML <nav class="toolbars"> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Dashboard</a> </li>

    <li class="toolbar-item"> <a href="toolbar-link">Loans</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Budget</a> </li> </ul> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Settings</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Logout</a> </li> </ul> </nav> Dashboard Loans Budget Settings Logout
  26. CSs .toolbars { display: flex; flex-direction: column; } @media screen

    and (min-width: 600px) { .toolbars { flex-direction: row; justify-content: space-between; } .toolbar { display: flex; align-items: center; } } Dashboard Loans BudgeT SETTINGS LOGOUT
  27. HTML <nav class="sidebar"> <ul class=“sidebar-group"> <li class="sidebar-item"> <a href="sidebar-link">Dashboard</a> </li>

    <li class="sidebar-item"> <a href="sidebar-link">Loans</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Budget</a> </li> </ul> <ul class="sidebar"> <li class="sidebar-item"> <a href="sidebar-link">Settings</a> </li> <li class="sidebar-item"> <a href="sidebar-link">Logout</a> </li> </ul> </nav> Dashboard Loans Budget Settings Logout
  28. HTML <nav class="toolbars"> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Dashboard</a> </li>

    <li class="toolbar-item"> <a href="toolbar-link">Loans</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Budget</a> </li> </ul> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Settings</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Logout</a> </li> </ul> </nav> PRIMARY HEADING Secondary Heading
  29. HTML <nav class="toolbars"> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Dashboard</a> </li>

    <li class="toolbar-item"> <a href="toolbar-link">Loans</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Budget</a> </li> </ul> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Settings</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Logout</a> </li> </ul> </nav> PRIMARY HEADING Secondary Heading PRIMARY HEADING Secondary Heading
  30. HTML <nav class="toolbars"> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Dashboard</a> </li>

    <li class="toolbar-item"> <a href="toolbar-link">Loans</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Budget</a> </li> </ul> <ul class="toolbar"> <li class="toolbar-item"> <a href="toolbar-link">Settings</a> </li> <li class="toolbar-item"> <a href="toolbar-link">Logout</a> </li> </ul> </nav> PRIMARY HEADING Secondary Heading
  31. HTML <ul class="users"> <li class="user"> <b class="user-name">Really really long username</b>

    <ul class="user-actions"> <li class="user-action"><a href="#">Edit</a></li> <li class="user-action"><a href="#">Arhive</a></li> <li class="user-action"><a href="#">Delete</a></li> </ul> </li> </ul> avery Swartz Matthew Farlymn kate grant Alex blom
  32. HTML <ul class="users"> <li class="user"> <b class="user-name">Really really long username</b>

    <ul class="user-actions"> <li class="user-action"><a href="#">Edit</a></li> <li class="user-action"><a href="#">Arhive</a></li> <li class="user-action"><a href="#">Delete</a></li> </ul> </li> </ul> avery Swartz Matthew Farlymn kate grant Alex blom
  33. HTML <ul class="users"> <li class="user"> <b class="user-name">Really really long username</b>

    <ul class="user-actions"> <li class="user-action"><a href="#">Edit</a></li> <li class="user-action"><a href="#">Arhive</a></li> <li class="user-action"><a href="#">Delete</a></li> </ul> </li> </ul> avery Swartz Matthew FaR. . . kate grant Alex blom
  34. CSs .user { display: flex; align-items: center; &-name { flex:

    1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } &-actions { display: flex; } } avery Swartz Matthew FaR. . . kate grant Alex blom
  35. HTML <ul class="tabs"> <li class="tab"> <a href="tab-action">Tab 1</a> </li> <li

    class="tab"> <a href="tab-action">Tab 2</a> </li> <li class="tab"> <a href="tab-action">Tab 3</a> </li> <li class="tab"> <a href="tab-action">Tab 4</a> </li> </ul> Tab 1 Tab 2 Tab 3 Tab 3
  36. HTML <ul class="tabs"> <li class="tab"> <a href="tab-action">Tab 1</a> </li> <li

    class="tab"> <a href="tab-action">Tab 2</a> </li> <li class="tab"> <a href="tab-action">Tab 3</a> </li> <li class="tab"> <a href="tab-action">Tab 4</a> </li> </ul> Tab 1 Tab 2 Tab 3 Tab 4 Tab 1 Tab 2 Tab 3 Tab 4 Tab 1 Tab 2 Tab 5
  37. HTML .tabs { display: flex; flex-direction: row; } .tab {

    flex: 1; } Tab 1 Tab 2 Tab 3 Tab 4 Tab 1 Tab 2 Tab 3 Tab 4 Tab 1 Tab 2 Tab 5
  38. HTML <div class="cards"> <div class="card"> <img src="icon.png"> <h2 class="card-title">Title</h2> <p

    class="card-description">Description</p> </div> <div class="card"> <img src="icon.png"> <h2 class="card-title">Title</h2> <p class="card-description">Description</p> </div> <div class="card"> <img src="icon.png"> <h2 class="card-title">Title</h2> <p class="card-description">Description</p> </div> ... </div> Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet
  39. CSs .cards { display: flex; flex-flow: row wrap; } .card

    { flex: 1 0 25%; } .card:nth-last-child(2):nth-child(4n) { min-width: 33%; } Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet
  40. CSs .cards { display: flex; flex-flow: row wrap; } .card

    { flex: 1 0 25%; } .card:nth-last-child(2):nth-child(4n) { min-width: 33%; } Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet
  41. CSs .cards { display: flex; flex-flow: row wrap; } .card

    { flex: 1 0 25%; } .card:nth-last-child(2):nth-child(4n) { min-width: 33%; } Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet Venenatis Sem Amet
  42. HTML <div class="cards"> <div class="card"> <img src="icon.png"> <h2 class="card-title">Title</h2> <p

    class="card-description">Description</p> <button class="card-action">Buy</h2> </div> <div class="card"> <img src="icon.png"> <h2 class="card-title">Title</h2> <p class=“card-description">Description</p> <button class="card-action">Buy</h2> </div> ... </div> Venenatis Sem Amet Venenatis Sem Amet Venenatis Venenatis Sem Amet Venenatis Sem Amet Venenatis Venenatis Venenatis Sem Amet Venenatis Venenatis Sem Amet
  43. CSs .cards { display: flex; flex-wrap: wrap; justify-content: center; }

    .card { display: flex; flex-basis: 20%; flex-direction: column; &-action { margin-top: auto; } } Venenatis Sem Amet Venenatis Sem Amet Venenatis Venenatis Sem Amet Venenatis Sem Amet Venenatis Venenatis Venenatis Sem Amet Venenatis Venenatis Sem Amet
  44. FIN