Responsive web design

From Wikipedia, the free encyclopedia
  (Redirected from Responsive Web Design)
Jump to: navigation, search

Responsive web design (often abbreviated to RWD) is an approach to web design in which a site is crafted to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from desktop computer monitors to mobile phones).[1][2][3]

Contents

[edit] Elements of responsive web design

A site designed with RWD[1][4] uses CSS3 media queries,[3][5][6] an extension of the @media rule,[7] to adapt the layout to the viewing environment—along with fluid proportion-based grids[8] and flexible images:.[9][10][11][12]

  • Media queries allow the page to use different CSS style rules based on characteristics of the device the site is being displayed on, most commonly the width of the browser.
  • The fluid grid concept calls for page element sizing to be in relative units like percentages or EMs, rather than absolute units like pixels or points.[8]
  • Flexible images are also sized in relative units (up to 100%), so as to prevent them from displaying outside their containing element.[9]

[edit] Related concepts

[edit] Mobile first, unobtrusive JavaScript, and progressive enhancement

"Mobile First" and "Unobtrusive JavaScript"/"Progressive Enhancement" (strategies for when a new site design is being considered) are related concepts that predated RWD: browsers of basic mobile phones do not understand Javascript or media queries, so the recommended practice is to create a basic web site then enhance it for smart phones and PCs—rather than try "graceful degradation" to make a complex, image-heavy site work on the most basic mobile phones.[13][14][15][16]

[edit] Progressive enhancement based on browser-, device-, or feature-detection

Where a web site must support basic mobile devices that lack JavaScript, Browser ("user agent") detection (also called "browser sniffing"), and mobile device detection[14][17] are two ways of deducing if certain HTML and CSS features are supported (as a basis for progressive enhancement)—however, these methods are not completely reliable.

For more capable mobile phones and PCs, JavaScript frameworks like Modernizr, jQuery, and jQuery Mobile that can directly test browser support for HTML/CSS features (or identify the device or user agent) are popular. Polyfills can be used to add support for features—e.g. to support media queries (required for RWD), and enhance HTML5 support, on Internet Explorer. Feature detection also might not be completely reliable with older browsers: some may report that a feature is available, when it is either missing or so poorly implemented that it is effectively nonfunctional.[18][19]

[edit] Challenges, and other approaches

Luke Wroblewski has summarized some of the RWD and mobile design challenges, and created a catalog of multi-device layout patterns.[20][21][22] He suggests that, compared with a simple RWD approach, Device Experience or RESS (Responsive Web Design with Server Side Components) approaches can provide a user experience that is better optimized for mobile devices.[23][24][25] Server-side "dynamic CSS" implementation of stylesheet languages like Sass can be part of such an approach.

One problem for RWD is that banner advertisements and videos are not fluid.[26] However search advertising and (banner) display advertising support specific device platform targeting and different advertisement size formats for desktop, smartphone, and basic mobile devices. Different landing page URLs can be used for different platforms,[27] or AJAX can be used to display different ad variants on a page.[17][21][28]

There are now many ways of validating and testing RWD designs,[29] ranging from mobile site validators and mobile emulators[30] to simultaneous testing tools like Adobe Edge Inspect.[31]

[edit] History

Ethan Marcotte coined the term Responsive Web Design (RWD) in his article in A List Apart.[1] He describes the theory and practice of responsive web design in his brief 2011 book on the subject.[32] Responsive Design was listed as #2 in Top Web Design Trends for 2012 by .net magazine[33] after Progressive Enhancement at #1. They also listed 20 of Ethan Marcotte's favorite responsive sites.[2]

[edit] References

  1. ^ a b c Marcotte, Ethan (May 25, 2010). "Responsive Web Design". A List Apart. http://www.alistapart.com/articles/responsive-web-design/.
  2. ^ a b "Ethan Marcotte's 20 favourite responsive sites". .net magazine. October 11, 2011. http://www.netmagazine.com/features/ethan-marcottes-20-favourite-responsive-sites.
  3. ^ a b Gillenwater, Zoe Mickley (Dec. 15, 2010). "Examples of flexible layouts with CSS3 media queries". Stunning CSS3. pp. 320. ISBN 978-0-321-722133. http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/.
  4. ^ Pettit, Zoe Nick (Aug. 8, 2012). "Beginner’s Guide to Responsive Web Design". TeamTreehouse.com blog. http://teamtreehouse.com/blog/beginners-guide-to-responsive-web-design.
  5. ^ Gillenwater, Zoe Mickley (Oct. 21, 2011). "Crafting quality media queries". http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/.
  6. ^ "Responsive design—harnessing the power of media queries". Google Webmaster Central. Apr. 30, 2012. http://googlewebmastercentral.blogspot.jp/2012/04/responsive-design-harnessing-power-of.html.
  7. ^ W3C @media rule
  8. ^ a b Marcotte, Ethan (March 3, 2009). "Fluid Grids". A List Apart. http://www.alistapart.com/articles/fluidgrids/.
  9. ^ a b Marcotte, Ethan (June 7, 2011). "Fluid images". A List Apart. http://www.alistapart.com/articles/fluid-images/.
  10. ^ "Adaptive Images". http://adaptive-images.com/.
  11. ^ Hannemann, Anselm (Sept. 7, 2012). "The road to responsive images". net Magazine. http://www.netmagazine.com/features/road-responsive-images.
  12. ^ Jacobs, Denise (August 23, 2011). "21 top tools for responsive web design". .net Magazine. http://www.netmagazine.com/features/21-top-tools-responsive-web-design.
  13. ^ Wroblewski, Luke (November 3, 2009). "Mobile First". http://www.lukew.com/ff/entry.asp?933.
  14. ^ a b Firtman, Maximiliano (July 30, 2010). Programming the Mobile Web. pp. 512. ISBN 978-0-596-80778-8. http://www.mobilexweb.com/book.
  15. ^ "Graceful degradation versus progressive enhancement". February 3, 2009. http://dev.opera.com/articles/view/graceful-degradation-progressive-enhancement/.
  16. ^ Designing with Progressive Enhancement. March 1, 2010. pp. 456. ISBN 978-0-321-65888-3. http://filamentgroup.com/dwpe/.
  17. ^ a b "Server-Side Device Detection: History, Benefits And How-To". Smashing magazine. September 24, 2012. http://mobile.smashingmagazine.com/2012/09/24/server-side-device-detection-history-benefits-how-to/.
  18. ^ "BlackBerry Torch: The HTML5 Developer Scorecard | Blog". Sencha. 2010-08-18. http://www.sencha.com/blog/blackberry-torch-the-html5-developer-scorecard. Retrieved 2012-09-11.
  19. ^ "Motorola Xoom: The HTML5 Developer Scorecard | Blog". Sencha. 2011-02-24. http://www.sencha.com/blog/motorola-xoom-the-html5-developer-scorecard/. Retrieved 2012-09-11.
  20. ^ Wroblewski, Luke (May 17, 2011). "Mobilism: jQuery Mobile". http://www.lukew.com/ff/entry.asp?1330.
  21. ^ a b Wroblewski, Luke (February 6, 2012). "Rolling Up Our Responsive Sleeves". http://www.lukew.com/ff/entry.asp?1494.
  22. ^ Wroblewski, Luke (March 14, 2012). "Multi-Device Layout Patterns". http://www.lukew.com/ff/entry.asp?1514.
  23. ^ Wroblewski, Luke (February 29, 2012). "Responsive Design ... or RESS". http://www.lukew.com/ff/entry.asp?1509.
  24. ^ Wroblewski, Luke (September 12, 2011). "RESS: Responsive Design + Server Side Components". http://www.lukew.com/ff/entry.asp?1392.
  25. ^ Andersen, Anders (May 9, 2012). "Getting Started with RESS". http://www.netmagazine.com/tutorials/getting-started-ress.
  26. ^ Snyder, Matthew; Koren, Etai (Apr. 30, 2012). "The state of responsive advertising: the publishers' perspective". .net Magazine. http://www.netmagazine.com/features/state-responsive-advertising-publishers-perspective.
  27. ^ Google AdWords Targeting (Device Platform Targeting)
  28. ^ JavaScript and Responsive Web Design Google Developers
  29. ^ Young, James (Aug. 13, 2012). "Top responsive web design problems... testing". .net Magazine. http://www.netmagazine.com/features/top-responsive-web-design-problems-and-how-avoid-them#8.
  30. ^ "Best mobile emulators and RWD testing tools". The Mobile Web Design Blog. Nov. 26, 2011. http://www.themobilewebdesignblog.com/2011/11/26/best-mobile-emulators-responsive-design-testing-tools/.
  31. ^ Rinaldi, Brian (Sept. 26, 2012). "Browser testing... with Adobe Edge Inspect". http://www.adobe.com/devnet/edge-inspect/articles/browser-testing-across-devices-with-adobe-edge-inspect.html.
  32. ^ Marcotte, Ethan (2011). Responsive Web Design. pp. 143. ISBN 978-0-9844425-7-7. http://www.abookapart.com/products/responsive-web-design.
  33. ^ "15 top web design and development trends for 2012". .net magazine. January 9, 2012. http://www.netmagazine.com/features/15-top-web-design-and-development-trends-2012.

[edit] External links