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

Modern Layouts: Getting Out of Our Ruts // SF H...

Modern Layouts: Getting Out of Our Ruts // SF HTML5

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 may be 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.

Response to this talk on Twitter: https://storify.com/jensimmons/modern-layouts-at-sfhtml5
and on Meetup.com: http://www.meetup.com/sfhtml5/events/219966720/

Jen Simmons

May 20, 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 #SFHTML5
  2. 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
  3. 1.

  4. <h1>Jeremy Keith</h1> <img src=“jeremykeith.jpg"> <p>Jeremy Keith lives in Brighton, England

    where he makes websites with the splendid design agency Clearleft.</p>
  5. 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;
  6. img { width: 50%; float: left; margin-right: 30px; margin-bottom: 30px;

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

    shape-outside: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
  8. 2.

  9. Working Draft Last Call Candidate
 Recommendation Proposed
 Recommendation Recommendation CSS

    Exclusions Module Level 1 Oct 1, 2013 dev.w3.org/csswg/css-exclusions
  10. Use Absolute Positioning to place an item (or CSS Grid).

    Then add property wrap-flow: wrap-flow: both;
  11. 3.

  12. 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%); }
  13. Working Draft Last Call Candidate
 Recommendation Proposed
 Recommendation Recommendation CSS

    Transforms Module level 1 Nov 26, 2013, “refining” w3.org/TR/css-transforms
  14. 4.

  15. img { width: 100%; } article { column-width: 200px; column-gap:

    2em; column-rule: 
 1px solid #444; }
  16. Working Draft Last Call Candidate
 Recommendation Proposed
 Recommendation Recommendation CSS

    Multicolumn Layout Module April 12, 2011 w3.org/TR/css-multicol
  17. 5.

  18. <main role="main"> <img src="../images/GraceHopper.jpg"> <div> <h1>Grace Hopper</h1> <p>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...</p> </div> </main>
  19. header { border: 20px solid #000; background: yellow; padding: 3em

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

    6em; height: 100vh; } h1 { font-size: 10vw; margin-top: 0; text-align: center; }
  21. 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
  22. Working Draft Last Call Candidate
 Recommendation Proposed
 Recommendation Recommendation CSS

    Values and Units Module level 3 July 30, 2013 w3.org/TR/css-values
  23. 6.

  24. header { border: 20px solid #000; background: yellow; min-height: 100vh;

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

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

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

    display: flex; align-items: center; justify-content: center; } h1 { font-size: 10vw; // margin: auto; }
  28. 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; }
  29. 7.

  30. Working Draft Last Call Candidate
 Recommendation Proposed
 Recommendation Recommendation CSS

    Grid Layout Module Level 1 May 13, 2014 w3.org/TR/css3-grid-layout
  31. Why Did You Tell Me About 
 All This Stuff

    
 I Totally Can’t Use Yet?
  32. When Can We Use This? Later Shapes Level 2 Exclusions

    Grid Maybe Never Regions What Was That 
 You Mumbled? Fragmentation Figures Overflow Now Shapes Level 1 Flexbox Viewport Units 5 Years Ago Transforms Multicolumn Layout Dynamic Grids 
 (odd numbers of columns, 
 ratio grids)
  33. The most dangerous phrase in the language is ‘We’ve always

    done it this way.’ 
 — Grace Hopper