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

Designing Evolution: Elements

Designing Evolution: Elements

Talk for Responsive Day Out 2 in Brighton, June 2014

Dan Donald

June 27, 2014
Tweet

More Decks by Dan Donald

Other Decks in Technology

Transcript

  1. Responsive web design is a recipe for managing and constraining

    the innate fluidity of the web. Monday, 30 June 14
  2. What do we know? Mozilla/5.0 (Macintosh; Intel Mac OS X

    10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 http://wurfl.io Monday, 30 June 14
  3. • write normal CSS • minimal JS to calculate •

    use minimum values & ranges Go & follow @itsaljones! Spike work Monday, 30 June 14
  4. Runs on load, resize & orientation change Measures the parent

    of modules flagged to watch (could be the module itself) Javascript Monday, 30 June 14
  5. Uses a regex to scrape the CSS for fuzzy selectors

    Adds ‘data-triggers’ to our mark-up Build Monday, 30 June 14
  6. /** * 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 } Monday, 30 June 14
  7. • what are you trying to say? • would capabilities

    change this? • need more assets? • communication is everything Monday, 30 June 14