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

Responsive Web Design: How I Started Caring And...

Responsive Web Design: How I Started Caring And Adopted Mobile First

A talk given at https://www.facebook.com/events/188741017978316/ event in Kraków, Poland. #omgkrk

Wojtek Zając

December 02, 2013
Tweet

More Decks by Wojtek Zając

Other Decks in Programming

Transcript

  1. http://www.flickr.com/photos/lng0004/7881151510/ 46% of population has access to a mobile phone

    (of any kind) http://www.economist.com/blogs/babbage/2012/10/global-mobile-usage?fsrc=scn/tw_ec/sim_earth
  2. 8 great food that everyone can enjoy (except those with

    an allergy, of course). In a similar sense, the content of our website should be able to be enjoyed without embellishment. Figure 1.2: A confectionary continuum. THINK OF THE USER, NOT THE BROWSER content presentation client-side scripting by aaron gustafson “adaptive web design”
  3. “Mobile must never be a dumbed-down, limited experience.” — Steven

    Hoober http://www.flickr.com/photos/chrisjl/5664339020/
  4. rwd: mobile last most websites don’t optimize assets… ~ Guy

    Podjarny, Performance Implications of Mobile Design #2
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0"> width=500 Custom width setting minimum-scale=1.0 Prevents

    from zooming out maximum-scale=1.0 Prevents from zooming in. Useful with forms user-scalable=no Use cautiously. Mostly for mobile-specific designs viewport
  6. CSS3 Media Queries <link rel="stylesheet" type="text/css" href="example.css" media=“all and (min-width:

    50rem)”> Media type Expression @import url("example.css") all and (min-width: 50rem);
 Equivalent of:
  7. CSS3 Media Queries <link rel="stylesheet" type="text/css" href="example.css" media=“all and (min-width:

    50rem)”> Media type Expression @import url("example.css") all and (min-width: 50rem);
 Equivalent of: @media all and (min-width: 50rem) {
 body { background: #f00; }
 } Equivalent of:
  8. rem ems relative to root element ! vh, vw, vmin,

    vmax based on viewport dimensions New css3 units
  9. 1.25MB average page weight (2012) http://wpdaily.co/responsive-server-side/ 86% of responsive websites

    don’t optimise resources http://www.lukew.com/ff/entry.asp?1681
  10. “87% of mobile users expect sites to load at least

    as fast, or faster than on their desktop.” "57% will abandon a site after waiting 3 seconds for a page to load.” http://www.strangeloopnetworks.com/web-performance-infographics/
  11. bower $ npm install -g bower $ bower search jquery

    $ bower install jquery —save-dev