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

Modern Layouts: Getting Out of Our Ruts

Modern Layouts: Getting Out of Our Ruts

In the early years of the web, there was a lot of variation and experimentation with where to put content on a web page. Then, it seems, we all settled into a handful of patterns and stayed there for over a decade. It wasn’t until the arrival of responsive design that new ideas for page layout started appearing. Now with new CSS properties for layout landing in browsers, we are about to see a bigger renaissance in layout design patterns. How can we better use the space inside the glass rectangle? What layout innovations could help users better find and focus on what they want? Take a walk through where we’ve been, where we might be going, and how we can better design for the true medium at hand. This talk features practical examples of what's newly possible, along with access to a code repo for you to play with later.

Live demo: http://labs.thewebahead.net/thelayoutsahead/
Code repo: https://github.com/jensimmons/thelayoutsahead

Presented at:

2015
An Event Apart, Seattle
An Event Apart, San Diego
An Event Apart, DC
An Event Apart, Chicago
An Event Apart, Austin
An Event Apart, San Francisco
Future of Web Design, San Francisco
Future of Web Design, New York
Ampersand, Brighton
Responsive Field Day, Portland
HOW Interactive, Boston
Push Conference, Munich
SFHTML5 Meetup, San Francisco
UIE Virtual Seminar, online
Responsive Web Design Summit, online

2014
Generate, New York
Blend Conf, Charlotte
CSS Dev Conf, New Orleans, Winner of Best Conference Presentation

Response to this talk: https://storify.com/jensimmons/

Interested in having me present this talk at your conference or company? Ping me at http://thewebahead.net/contact. Video available on request, for your consideration.

I am also creating a one- or two-day workshop version. Ask me about it.

Jen Simmons

June 09, 2015
Tweet

More Decks by Jen Simmons

Other Decks in Technology

Transcript

  1. MODERN LAYOUTS
    Getting Out of Our Ruts
    THE WEB AHEAD
    thewebahead.net
    JEN SIMMONS
    @jensimmons

    View Slide

  2. View Slide

  3. View Slide

  4. View Slide

  5. View Slide

  6. View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. View Slide

  11. View Slide

  12. View Slide

  13. The most prominent result from the new eyetracking studies is not actually new.
    We simply confirmed for the umpteenth time that banner blindness is real.
    —Jakob Nielsen, August 20, 2007, Banner Blindness: Old and New Findings

    View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. A
    C
    B
    A C
    B
    A
    C
    B
    A
    C
    B

    View Slide

  19. View Slide

  20. View Slide

  21. View Slide

  22. View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. View Slide

  27. View Slide

  28. View Slide

  29. View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. View Slide

  38. View Slide

  39. View Slide

  40. View Slide

  41. View Slide

  42. View Slide

  43. View Slide

  44. View Slide

  45. View Slide

  46. View Slide

  47. The medium shapes
    the medium.

    View Slide

  48. ?

    View Slide

  49. There’s a world of
    Graphic Design
    older than the web.

    View Slide

  50. View Slide

  51. View Slide

  52. View Slide

  53. View Slide

  54. View Slide

  55. View Slide

  56. vogue.com

    View Slide

  57. View Slide

  58. View Slide

  59. View Slide

  60. View Slide

  61. View Slide

  62. View Slide

  63. View Slide

  64. View Slide

  65. View Slide

  66. View Slide

  67. View Slide

  68. View Slide

  69. Layout should
    serve the content.

    View Slide

  70. MAGAZINES

    View Slide

  71. 1.

    View Slide

  72. View Slide

  73. View Slide

  74. View Slide

  75. View Slide

  76. CSS Shapes

    View Slide

  77. Jeremy Keith

    Jeremy Keith lives in
    Brighton, England where he
    makes websites with the
    splendid design agency
    Clearleft.

    View Slide

  78. img {
    float: left;
    margin-right: 2em;
    margin-bottom: 0.5em;
    }

    View Slide

  79. img {
    float: left;
    margin-right: 2em;
    margin-bottom: 0.5em;
    shape-outside: circle();
    }

    View Slide

  80. Working Draft Last Call
    Candidate

    Recommendation
    Proposed

    Recommendation Recommendation
    CSS Shapes, Level 1
    March 20, 2014
    w3.org/TR/css-shapes-1

    View Slide

  81. View Slide

  82. View Slide

  83. View Slide

  84. shape-outside: circle();
    shape-outside: ellipse();
    shape-outside: border-box;
    shape-outside: inset(0px round

    120px) border-box;
    shape-outside: url(http://

    example.com/image.jpg);
    shape-margin: 30px;

    View Slide

  85. labs.thewebahead.net

    View Slide

  86. github.com/jensimmons/thelayoutsahead

    View Slide

  87. img {
    width: 50%;
    float: left;
    margin-right: 30px;
    margin-bottom: 30px;
    shape-outside:
    ellipse(50% 50%);
    }

    View Slide

  88. img {
    width: 50%;
    float: left;
    margin-right: 30px;
    margin-bottom: 30px;
    border-radius: 100px;
    }

    View Slide

  89. img {
    width: 50%;
    float: left;
    margin-right: 30px;
    margin-bottom: 30px;
    border-radius: 100px;
    shape-outside:border-box;
    shape-margin: 30px;
    }

    View Slide

  90. View Slide

  91. img {
    width: 60%;
    float: left;
    margin-right: 30px;
    margin-bottom: 30px;
    shape-outside:
    polygon(50% 0,
    100% 50%,
    50% 100%,
    0 50%);
    }

    View Slide

  92. View Slide

  93. View Slide

  94. View Slide

  95. View Slide

  96. View Slide

  97. View Slide

  98. View Slide

  99. Shapes Level 1 — NOW!
    shape-outside: foo();
    Shapes Level 2 — Later
    shape-inside: foo();

    View Slide

  100. View Slide

  101. Vote for CSS Shapes!
    https://bugzilla.mozilla.org/
    show_bug.cgi?id=1040714
    https://wpdev.uservoice.com/forums/257854-internet-
    explorer-platform/suggestions/6263716-shapes

    View Slide

  102. 2.

    View Slide

  103. View Slide

  104. View Slide

  105. View Slide

  106. View Slide

  107. View Slide

  108. Working Draft Last Call
    Candidate

    Recommendation
    Proposed

    Recommendation Recommendation
    CSS Exclusions, Level 1
    Jan 15, 2015
    w3.org/TR/css3-exclusions

    View Slide

  109. Use Absolute Positioning
    to place an item (or CSS Grid).
    Then add property wrap-flow:
    wrap-flow: both;

    View Slide

  110. View Slide

  111. 3.

    View Slide

  112. View Slide

  113. View Slide

  114. View Slide

  115. View Slide

  116. View Slide

  117. View Slide

  118. main {
    transform: 

    rotate(-10deg);
    }

    View Slide

  119. h1 {
    transform:

    rotate(-90deg);
    }

    View Slide

  120. h1 {
    float: left;
    padding-bottom: 200px;
    transform: 

    rotate(-45deg);
    shape-outside: 

    polygon(nonzero,
    -58px 80.55%, 75.95% -70px,
    89.55% -33.65%, -13.4%
    121.45%);
    }

    View Slide

  121. main {
    width: 300px;
    }
    @media (min-width: 500px) {
    main {
    background: red;
    transform: rotate(-10deg); }
    }
    @media (min-width: 700px) {
    main {
    background: green;
    transform: rotate(-20deg); }
    }
    @media (min-width: 900px) {
    main {
    width: 400px;
    background: blue;
    transform: rotate(-30deg); }
    }

    View Slide

  122. transform: rotate

    View Slide

  123. Working Draft Last Call
    Candidate

    Recommendation
    Proposed

    Recommendation Recommendation
    CSS Transforms, Level 1
    Nov 26, 2013
    w3.org/TR/css-transforms-1

    View Slide

  124. View Slide

  125. 4.

    View Slide

  126. View Slide

  127. View Slide

  128. View Slide

  129. View Slide

  130. View Slide

  131. View Slide

  132. Multiple Column
    Layout

    View Slide

  133. View Slide

  134. View Slide

  135. article {
    max-width: 500px;
    margin: 0 auto;
    }

    View Slide

  136. article {
    column-count: 2;
    column-gap: 2em;
    }

    View Slide

  137. View Slide

  138. article {
    // column-count: 2;
    column-width: 200px;
    column-gap: 2em;
    }

    View Slide

  139. View Slide

  140. View Slide

  141. img {
    width: 100%;
    }
    article {
    column-width: 200px;
    column-gap: 2em;
    column-rule: 

    1px solid #444;
    }

    View Slide

  142. Working Draft Last Call
    Candidate

    Recommendation
    Proposed

    Recommendation Recommendation
    CSS Multicolumn Layout
    April 12, 2011
    w3.org/TR/css3-multicol

    View Slide

  143. View Slide

  144. View Slide

  145. View Slide

  146. CSS Regions

    View Slide

  147. View Slide

  148. View Slide

  149. View Slide

  150. View Slide

  151. View Slide

  152. View Slide

  153. 5.

    View Slide

  154. View Slide

  155. View Slide

  156. View Slide

  157. View Slide

  158. View Slide




  159. Grace Hopper
    Grace Murray Hopper (December 9,
    1906 – January 1, 1992) was an American
    computer scientist and United States
    Navy rear admiral. A pioneer in the
    field, she was one of the first
    programmers of the Harvard Mark I
    computer, and invented the first
    compiler for a computer programming
    language...


    View Slide

  160. img {
    float: left;
    margin-right: 2em;
    width: 50%;
    }
    div {
    padding: 2em;
    }

    View Slide

  161. View Slide

  162. img {
    float: left;
    margin-right: 2em;
    // width: 50%;
    height: 100vh;
    }
    div {
    padding: 2em;
    }

    View Slide

  163. View Slide

  164. img {
    float: left;
    margin-right: 2em;
    width: 50vw;
    height: 100vh;
    }
    h1 {
    font-size: 6vw;
    }

    View Slide

  165. View Slide


  166. Full-height “Cover
    Sheets” are the new Splash
    Page

    Lorum ipsum article
    content…

    View Slide

  167. header {
    border: 20px solid #000;
    background: yellow;
    padding: 3em 6em;
    }
    h1 {
    font-size: 10vw;
    margin-top: 0;
    text-align: center;
    }

    View Slide

  168. header {
    border: 20px solid #000;
    background: yellow;
    padding: 3em 6em;
    height: 100vh;
    }
    h1 {
    font-size: 10vw;
    margin-top: 0;
    text-align: center;
    }

    View Slide

  169. View Slide

  170. View Slide

  171. View Slide

  172. Viewport Units

    View Slide

  173. Anyplace you might use em, rem, %, px
    you can instead use:
    vh viewport height
    vw viewport width
    vmin smaller viewport number
    vmax larger viewport number

    View Slide

  174. Working Draft Last Call
    Candidate

    Recommendation
    Proposed

    Recommendation Recommendation
    CSS Values and Units,
    Level 3
    July 30, 2013
    w3.org/TR/css3-values

    View Slide

  175. View Slide

  176. View Slide

  177. 6.

    View Slide

  178. View Slide

  179. header {
    border: 20px solid #000;
    background: yellow;
    min-height: 100vh;
    padding: 3em 6em;
    }
    h1 {
    font-size: 10vw;
    margin: 0;
    text-align: center;
    }

    View Slide

  180. header {
    border: 20px solid #000;
    background: yellow;
    min-height: 100vh;
    }
    h1 {
    font-size: 10vw;
    margin: 0;
    }

    View Slide

  181. header {
    border: 20px solid #000;
    background: yellow;
    min-height: 100vh;
    display: flex;
    }
    h1 {
    font-size: 10vw;
    margin: auto;
    }

    View Slide

  182. header {
    border: 20px solid #000;
    background: yellow;
    min-height: 100vh;
    display: flex;
    }
    h1 {
    font-size: 10vw;
    margin: auto;
    }

    View Slide

  183. View Slide

  184. header {
    border: 20px solid #000;
    background: yellow;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    }
    h1 {
    font-size: 10vw;
    // margin: auto;
    }

    View Slide

  185. header {
    border: 20px solid #000;
    background: yellow;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    }
    h1 {
    font-size: 10vw;
    margin: 0;
    }

    View Slide

  186. Flexbox

    View Slide

  187. Working Draft Last Call
    Candidate

    Recommendation
    Proposed

    Recommendation Recommendation
    CSS Flexible Box Layout, Level 1
    May 14, 2015
    w3.org/TR/css-flexbox-1

    View Slide

  188. View Slide

  189. View Slide

  190. View Slide

  191. View Slide

  192. View Slide

  193. View Slide

  194. 7.

    View Slide

  195. View Slide

  196. CSS Grid Layout

    View Slide

  197. Working Draft Last Call
    Candidate

    Recommendation
    Proposed

    Recommendation Recommendation
    CSS Grid Layout, Level 1
    March 17, 2015
    w3.org/TR/css-grid-1

    View Slide

  198. View Slide

  199. View Slide

  200. View Slide

  201. View Slide

  202. Old School
    Floats

    View Slide

  203. Dynamic
    Grids

    View Slide

  204. View Slide

  205. View Slide

  206. View Slide

  207. View Slide

  208. View Slide

  209. When?

    View Slide

  210. When Can I Use This
    in Production?
    (aka on a Real Website)

    View Slide

  211. Why Did You Tell Me About 

    All This Stuff 

    I Totally Can’t Use Yet?

    View Slide

  212. Do Websites Need To Look
    Exactly The Same in Every
    Browser?

    View Slide

  213. DoWebsitesNeedToLook

    ExactlyTheSameinEvery

    Browser.com

    View Slide

  214. View Slide

  215. Progressive
    Enhancement

    View Slide

  216. View Slide

  217. When Can I Use This?
    Later
    Shapes Level 2
    Exclusions
    Grid Layout
    Maybe Never
    Regions
    What Was That 

    You Mumbled?
    Fragmentation
    Figures
    Overflow
    (???…)
    Now
    Shapes Level 1
    Flexbox
    Viewport Units
    5 Years Ago
    Rotation
    Multicolumn Layout
    Dynamic Grids
    (odd numbers of columns, 

    ratio grids)

    View Slide

  218. Hardest part is
    changing our thinking,
    not our CSS.

    View Slide

  219. Magazines
    and
    The Web

    View Slide

  220. View Slide

  221. View Slide

  222. View Slide

  223. View Slide

  224. View Slide

  225. Translate.
    Don’t Transfer.

    View Slide

  226. View Slide

  227. View Slide

  228. View Slide

  229. (*Totally stolen from Karen McGrane’s incredible talk, Adapting Ourselves to Adaptive Content.)

    View Slide

  230. View Slide

  231. View Slide

  232. The most
    dangerous phrase
    in the language is
    ‘We’ve always done
    it this way.’ 

    — Grace Hopper

    View Slide

  233. One Last Story

    View Slide

  234. View Slide

  235. View Slide

  236. View Slide

  237. View Slide

  238. ?

    View Slide

  239. THE WEB AHEAD
    thewebahead.net
    JEN SIMMONS
    @jensimmons
    Thank you!
    Workshops. Consulting. Design.
    Come talk to me.

    View Slide