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

Responsive Retrofitting

Responsive Retrofitting

Covering tips on WordPress, web performance, navigation, HTML tables, and more, Responsive Retrofitting takes legacy sites with fixed-widths designs and make them ready for a mobile viewing.

Until a time in the future starting over is financially and feasible, *responsively retrofitting* is financially effective and time saving solution.

Avatar for Christopher Schmitt

Christopher Schmitt

March 15, 2016
Tweet

Other Decks in Technology

Transcript

  1. RESPONSIVE CONSIDERATIONS ➤ Different screen sizes from various devices means

    our designs need to scale ➤ Different resolutions of those screens means our images need to stay sharp. ➤ Different speeds of internet (Hotel wifi vs Google Fiber) means we need to optimize performance, speed.
  2. GO RETROFITTING ➤ Keep the same design ➤ Same UI,

    happy current visitors and members ➤ Saves money ➤ Saves time ➤ Plan on full RWD experience when the time and budget works for you. ➤ Until then…
  3. Find a RWD Theme and switch to it. Or use

    underscores.me and start building your own.
  4. You can either regenerate the thumbnails for all image uploads,

    individual image uploads, or specific multiple image uploads.
  5. <img width="720" height="480" src="http:// christopher.org/wp-content/uploads/2016/03/zell- leiw-720x480.jpg" class="attachment-post- thumbnail size-post-thumbnail wp-post-image"

    alt="Zell Leiw" 
 srcset="http://christopher.org/wp-content/ uploads/2016/03/zell-leiw-300x200.jpg 300w, 
 http://christopher.org/wp-content/uploads/ 2016/03/zell-leiw-768x512.jpg 768w, 
 http://christopher.org/wp-content/uploads/ 2016/03/zell-leiw-720x480.jpg 720w, 
 http://christopher.org/wp-content/uploads/ 2016/03/zell-leiw.jpg 800w" 
 sizes="(max-width: 720px) 100vw, 720px">
  6. “ [In 2013, Intel sees their product line] offer a

    higher resolution experience than a top-of-the-line 1080p HDTV.”
  7. 240

  8. 4x

  9. <img sizes="(min-width: 30em) 100vw, (min-width: 50em) 50vw, 200px" srcset="swing-200.jpg 200w,

    swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">
  10. <img sizes="(min-width: 30em) 100vw, (min-width: 50em) 50vw, 200px" srcset="swing-200.jpg 200w,

    swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">
  11. <img sizes="(min-width: 30em) 100vw, (min-width: 50em) 50vw, 200px" srcset="swing-200.jpg 200w,

    swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">
  12. <img sizes="(min-width: 30em) 100vw, (min-width: 50em) 50vw, 200px" srcset="swing-200.jpg 200w,

    swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w" src="swing-400.jpg" alt="Kettlebell Swing">
  13. #1

  14. @media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width:

    1024px) { /* Force table to not be like tables anymore */ table, thead, tbody, th, td, tr { display: block; } /* Hide table headers (but not display: none;, for accessibility) */ thead tr { position: absolute; top: -9999px; left: -9999px; } tr { border: 1px solid #ccc; } td { /* Behave like a "row" */ border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; } td:before { /* Now like a table header */ position: absolute; /* Top/left values mimic padding */ xtop: 6px; xleft: 6px; left: 50%; @media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device- width: 1024px)
  15. @media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width:

    1024px) { /* Force table to not be like tables anymore */ table, thead, tbody, th, td, tr { display: block; } /* Hide table headers (but not display: none;, for accessibility) */ thead tr { position: absolute; top: -9999px; left: -9999px; } tr { border: 1px solid #ccc; } td { /* Behave like a "row" */ border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; } td:before { /* Now like a table header */ position: absolute; /* Top/left values mimic padding */ xtop: 6px; xleft: 6px; left: 50%; /* Force table to not be like tables anymore */ table, thead, tbody, th, td, tr { display: block; }
  16. @media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width:

    1024px) { /* Force table to not be like tables anymore */ table, thead, tbody, th, td, tr { display: block; } /* Hide table headers (but not display: none;, for accessibility) */ thead tr { position: absolute; top: -9999px; left: -9999px; } tr { border: 1px solid #ccc; } td { /* Behave like a "row" */ border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; } td:before { /* Now like a table header */ position: absolute; /* Top/left values mimic padding */ xtop: 6px; xleft: 6px; left: 50%; /* Hide table headers (but not display: none;, for accessibility) */ thead tr { position: absolute; top: -9999px; left: -9999px; }
  17. @media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width:

    1024px) { /* Force table to not be like tables anymore */ table, thead, tbody, th, td, tr { display: block; } /* Hide table headers (but not display: none;, for accessibility) */ thead tr { position: absolute; top: -9999px; left: -9999px; } tr { border: 1px solid #ccc; } td { /* Behave like a "row" */ border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; } td:before { /* Now like a table header */ position: absolute; /* Top/left values mimic padding */ xtop: 6px; xleft: 6px; left: 50%; tr { border: 1px solid #ccc; } td { /* Behave like a "row" */ border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; }
  18. @media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width:

    1024px) { /* Force table to not be like tables anymore */ table, thead, tbody, th, td, tr { display: block; } /* Hide table headers (but not display: none;, for accessibility) */ thead tr { position: absolute; top: -9999px; left: -9999px; } tr { border: 1px solid #ccc; } td { /* Behave like a "row" */ border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; } td:before { /* Now like a table header */ position: absolute; /* Top/left values mimic padding */ left: 50%; top: 50%; transform: translate(-70%, -50%); width: 50%; padding-right: 10px; white-space: nowrap; } td:before { /* Now like a table header */ position: absolute; /* Top/left values mimic padding */ left: 50%; top: 50%; transform: translate(-70%, -50%); width: 50%; padding-right: 10px; white-space: nowrap; }
  19. position: absolute; top: -9999px; left: -9999px; } tr { border:

    1px solid #ccc; } td { /* Behave like a "row" */ border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; } td:before { /* Now like a table header */ position: absolute; /* Top/left values mimic padding */ left: 50%; top: 50%; transform: translate(-70%, -50%); width: 50%; padding-right: 10px; white-space: nowrap; } /* Label the data */ td:nth-of-type(1):before { content: "Film"; } td:nth-of-type(2):before { content: "Release Date"; } td:nth-of-type(3):before { content: "Director"; } td:nth-of-type(4):before { content: "Screenwriter(s)"; } td:nth-of-type(5):before { content: "Producer"; } td:nth-of-type(6):before { content: "Distributor"; } td:nth-of-type(7):before { content: "Status"; } } /* Label the data */ td:nth-of-type(1):before { content: "Film"; } td:nth-of-type(2):before { content: "Release Date"; } td:nth-of-type(3):before { content: "Director"; } td:nth-of-type(4):before { content: “Screenwriter(s)";} td:nth-of-type(5):before { content: "Producer"; } td:nth-of-type(6):before { content: "Distributor"; } td:nth-of-type(7):before { content: "Status"; } }
  20. #2

  21. /* Attach the Table CSS and Javascript */ <link rel="stylesheet"

    href="responsive-tables.css"> <script src="stylesheet" href="responsive- tables.js"></script>
  22. #1

  23. .nav ul { display: none; list-style: none; padding: 0px; margin:

    0px; font-weight: bold; text-align: center; } .nav ul li { display: inline-block; text-align: left; } .nav ul li a { display: block; padding: 15px 10px; text-decoration: none; color: #444; } .nav ul li a:hover { background-color: #ccc; } .anchor-link { display: inline-block; text-align: center; padding: 10px 15px; color: #fff; background-color: #0084B4; text-decoration: none; margin: 3px; float: right; } .example-footer { font-size: 1.1em; .nav ul { display: none; list-style: none; padding: 0px; margin: 0px; font-weight: bold; text-align: center; } .nav ul li { display: inline-block; text-align: left; } .nav ul li a { display: block; padding: 15px 10px; text-decoration: none; color: #444; } .nav ul li a:hover { background-color: #ccc; }
  24. .nav ul { display: none; list-style: none; padding: 0px; margin:

    0px; font-weight: bold; text-align: center; } .nav ul li { display: inline-block; text-align: left; } .nav ul li a { display: block; padding: 15px 10px; text-decoration: none; color: #444; } .nav ul li a:hover { background-color: #ccc; } .anchor-link { display: inline-block; text-align: center; padding: 10px 15px; color: #fff; background-color: #0084B4; text-decoration: none; margin: 3px; float: right; } .example-footer { .anchor-link { display: inline-block; text-align: center; padding: 10px 15px; color: #fff; background-color: #0084B4; text-decoration: none; margin: 3px; float: right; }
  25. margin: 3px; float: right; } .example-footer { font-size: 1.1em; }

    #mobile-nav { display: block; } #mobile-nav ul { list-style: none; margin: 0px; padding: 0px; } #mobile-nav ul li { list-style: none; text-align: center; } #mobile-nav ul li a { display: block; padding: 20px 10px; border-bottom: 1px solid #ccc; text-decoration: none; } #mobile-nav ul li a:hover { background-color: #ccc; color: #fff; } @media all and (min-width:48em){ .nav ul { display: block; } .anchor-link { display: none; } #mobile-nav { display: none; } } @media all and (min-width: 48em){ .nav ul { display: block; } .anchor-link { display: none; } #mobile-nav { display: none; } }
  26. #2

  27. .nav ul li { display: inline-block; } .nav ul li

    a { display: block; padding: 10px 20px; text-decoration: none; color: #444; } .nav ul li a:hover { background-color: #888; color: #fff; } @media (max-width:48.000em){ .example-header .container { width: 100%; } .nav ul { width: 100%; font-weight: normal; } .nav ul li { width: 50%; float: left; } .nav ul li:nth-of-type(odd) a { border-right: 1px solid #ccc; } .nav ul li a { padding: 8px 0px; border-bottom: 1px solid #ccc; display: block; } } @media (max-width:48.000em){ .example-header .container { width: 100%; } .nav ul { width: 100%; font-weight: normal; } .nav ul li { width: 50%; float: left; } .nav ul li:nth-of-type(odd) a { border-right: 1px solid #ccc; } .nav ul li a { padding: 8px 0px; border-bottom: 1px solid #ccc; display: block; } }
  28. .nav { width: 100%; } .nav ul { list-style: none;

    padding: 0px; margin: 0px; font-weight: bold; text-align: center; } .nav ul li { display: inline-block; } .nav ul li a { display: block; padding: 10px 20px; text-decoration: none; color: #444; } .nav ul li a:hover { background-color: #888; color: #fff; } @media (max-width:48.000em){ .example-header .container { width: 100%; } .nav ul { width: 100%; font-weight: normal; } .nav ul li { width: 50%; .nav { width: 100%; } .nav ul { list-style: none; padding: 0px; margin: 0px; font-weight: bold; text-align: center; } .nav ul li { display: inline-block; } .nav ul li a { display: block; padding: 10px 20px; text-decoration: none; color: #444; } .nav ul li a:hover { background-color: #888; color: #fff; }
  29. #3

  30. /* styles for desktop */ .tinynav { display: none }

    /* styles for mobile */ @media screen and (max-width: 600px) { .tinynav { display: block; margin: 1em auto; } #nav { display: none; } }
  31. .anchor-link { display: none; text-align: right; padding: 0 1em 0;

    text-align: center; padding: 10px 15px; color: #fff; background-color: #0084B4; text-decoration: none; margin: 3px; float: right; } #mobile-nav { display:none; }
  32. @media (max-width:48.000em){ ul.simple-toggle { display: none; } .anchor-link, #mobile-nav {

    display: block; } ul.open { background-color: #F4F4F4; box-shadow: 2px 2px 3px #444444; display: block; list-style: none outside none; margin: 0; padding: 0; position: absolute; right: 5px; top: 100%; width: 70%; z-index: 500;
  33. GO RETROFITTING ➤ Keep the same design ➤ Same UI,

    happy current visitors and members ➤ Saves money ➤ Saves time ➤ Plan on full RWD experience when the time and budget works for you. ➤ Until then…
  34. FIND ME AT ➤ TWITTER @teleject ➤ EMAIL [email protected]

    WEB http://christopher.org ➤ Hosting virtual Responsive Web Design Summit March 29-31 ➤ http://RWDSummit.com/