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

Designing Evolution

Designing Evolution

What does it really mean work with the flexibility we have through responsive web design; the interpretations of that recipe and how we can go so much further than just looking at viewport widths. In part that may be about 'element queries': what are they? Do we need them? How do they make us look differently at what we do?

Dan Donald

May 16, 2014
Tweet

More Decks by Dan Donald

Other Decks in Technology

Transcript

  1. @media screen only and (min-width:20em) { ... } @media screen

    only and (min-width:30em) and (max-width:40em) { ... } @media (min-width:40em) and (max-width:50em), (min-width:70em) and (max-width: 90em) { ... } Cascade Range Stack
  2. The power! @media (min-width: 30em) and (max-width: 35em) and (max-device-width:800px),

    (min-width: 45em) and (max-width: 60em) and (orientation:landscape), print and (min-width:10cm) { ... }
  3. • write normal CSS • scrape with build process •

    minimal JS to calculate • use minimum values & ranges
  4. Uses a regex to scrape the CSS for fuzzy selectors

    Adds ‘data-triggers’ to our mark-up Build
  5. runs on load, resize & orientation change measures the parent

    of modules flagged to watch Javascript
  6. • what are you trying to say? • would capabilities

    change this? • need more assets? • communication is everything
  7. /** * Trigger Points **/ [data-width~="10em"] .mod_colours { background-color: red

    } [data-width~="20em"] .mod_colours { background-color: yellow } [data-width~="30em"] .mod_colours { background-color: pink } [data-width~="40em"] .mod_colours { background-color: lightgreen } [data-width~="50em"] .mod_colours { background-color: purple } [data-width~="60em"] .mod_colours { background-color: orange } [data-width~="70em"] .mod_colours { background-color: blue }