This is a paradigm shift. “...scientific advancement is not evolutionary, but rather is a series of peaceful interludes punctuated by intellectually violent revolutions, and in those revolutions one conceptual world is replaced by another...” Thomas Kuhn 4 Monday, January 16, 2012
Responsive Web Design • A flexible foundation (fluid grid) • Flexible content (images, video, etc.) • Media queries https://github.com/sparkbox/CodeMash-RWD 16 Monday, January 16, 2012
Flexible Content http://www.netmagazine.com/tutorials/create-fluid-width-videos • set width to 100%, remove height • add a wrapper to maintain aspect ratio • use JS to detect and maintain size 29 Monday, January 16, 2012
Media Queries @media only screen and (min-width: 600px) { /* styles for 600px and up here */ } @media only screen and (max-width: 600px) { /* styles for 600px and down here */ } 31 Monday, January 16, 2012
Media Queries /* Large Resolution First CSS File Structure */ /* large resolution layouts here */ @media only screen and (max-width: 850px) { /* styles for 850px and down here */ } @media only screen and (max-width: 450px) { /* styles for 450px and down here */ } 32 Monday, January 16, 2012
Media Queries /* Small Resolution First CSS File Structure */ /* smallest resolution layouts here */ @media only screen and (min-width: 450px) { /* styles for 450px and up here */ } @media only screen and (min-width: 850px) { /* styles for 850px and up here */ } 33 Monday, January 16, 2012
Media Queries Large Resolution First PRO: IE support by default CON: Smallest devices load all assets Small Resolution First PRO: More logical (build up vs tear down) CON: IE support is tricky 34 Monday, January 16, 2012
Media Queries Large Resolution First PRO: IE support by default CON: Smallest devices load all assets Small Resolution First PRO: More logical (build up vs tear down) CON: IE support is tricky 35 Monday, January 16, 2012
Challenge: Images JavaScript Device Detection Resize Service Headers New tag New format There are quite a few potential solutions 39 Monday, January 16, 2012
Challenge: Ads Boston Globe Mark Boulton • Use JavaScript to reposition • Fixed-width and centered • Clipped at some resolutions 43 Monday, January 16, 2012
Challenge: Ads Boston Globe Mark Boulton Mark wrote a solid summary of the major issues he’s facing while working on this. (Google “responsive advertising”) 44 Monday, January 16, 2012
Challenge: Big Tables Switch Orientation Hide Columns Visualize Chris Coyer originally suggested that we use some CSS to change the orientation. 46 Monday, January 16, 2012
Challenge: Big Tables Switch Orientation Hide Columns Visualize We could replace the table of data with a chart that provides a summary. 48 Monday, January 16, 2012
Thanks. Ben Callahan President of Sparkbox @bencallahan http://seesparkbox.com I’ll be publishing this presentation soon. Follow me on Twitter for more info. 52 Monday, January 16, 2012
And, finally... Ben Callahan President of Sparkbox @bencallahan http://seesparkbox.com Responsive web design is always the right decision, but it’s not always the only decision. (a bit of controversy to discuss instead of questions...) 53 Monday, January 16, 2012