SlideShare a Scribd company logo
Responsive
    &
Responsible

Scott Jehl   filament group
We design engaging sites and
filament group   applications that are simple to
                use and accessible to all.
“An escalator can never
                break: it can only become
                stairs. ”

Mitch Hedberg
Responsive Design
A natural subset of Progressive Enhancement.
Responsible
 Delightful and inclusive.
Inclusive                      Delightful

 It works in my                    It feels intuitive.
    browser.




                                       It’s fun to use!
 It allows me to
complete my task


                   It’s damned fast!
Make it work
     everywhere.
...and work especially well in newer browsers!
There are, in fact,

Many ways
   to skin an app.
“it depends.”
- Every speaker at this conference.
Should it be responsive?
• Commonality across experiences
• Developer Skillset
• Time up-front vs. maintenance
• Interest in a challenge
PE, done right, is hard.
        Make no mistake!
A proposition:

A layered approach
  can be rich, without being exclusive.
Talk = cheap.
We built something.
    Let’s tear it apart, shall we?
A One-Web Case Study
Responsive & Responsible: Implementing Responsive Design at Scale
Design-velopment Team
      @mirandamulligan


      @filamentgroup


      @beep


      @upstatement
Responsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at Scale
Responsive.
 But is it responsible?
Areas of Responsibility


Accessibility   Performance


Usability       Sustainability
Responsive... ble baseline

• “Content” first
• Mobile-first images
• Mobile-friendly layout
Asset Baseline
• Basic CSS file
• Basic JS file
• Qualified Enhanced CSS file
Experience Divisions
 Defensive Development = Qualified Upgrades
Basic CSS
“Basic” = safe defaults
• Tweaks to browser typography
• Horizontal rules
• Text alignment
• Display: Inline / Block
• No complex layout or positioning
“Basic”
Responsive & Responsible: Implementing Responsive Design at Scale
Enhanced Experience
The @media qualifier
“If you’re awesome,
                 or you’re Internet Explorer,
                 you get enhanced.”

Ethan Marcotte
@media-fortified design.


<link href="enhanced.css" media="only all">
All in your <head>

<link rel=...” href=”basic.css” id=”basic”>
<!--[if gte IE 6]><link href="enhanced.css"
rel="stylesheet"><![endif]-->

<!--[if !IE]><!--><link href="enhanced.css"
media="only all"><!--<![endif]-->

<script src=”basic.js”></script>
The Concatenator
Server-side Concatenation

<link href=”css/
file1.css,file2.css,file3.css”
..>


          Minify + Gzip
Enhanced CSS

/* styles for everyone go here.. */


@media all and (min-width: 500px){ .. }
@media all and (min-width: 620px){ .. }
@media all and (min-width: 950px){ .. }
Inheritance Prevention

@media all and (min-width: 500px)
and (max-width: 700px){
    /* styles constrained to 500-700px */
}
Left




Right



 Left
Display: table + table-cell
Ems all the way down.


    Ems allow for components to adapt
     differently in different containers
Basic.js: “just enough”

•   ResponsiveImages.js
•   Respond.js
•   Modernizr / extensions / HTML5 Shim
•   The Boston Globe JS Framework
Responsive & Responsible: Implementing Responsive Design at Scale
Also.
Responsive Images
<img
       src=”foo.r.jpg”
              data-fullsrc=”foo.lrg.jpg”
/>
Edge Cases
Edge Cases
Respond.js


         Now available as part of




https://github.com/scottjehl/Respond
Also: matchMedia polyfill
  github.com/paulirish/matchMedia.js



 window.matchMedia( “only all” );
Responsive & Responsible: Implementing Responsive Design at Scale
Globe JS Framework
The globe, um... global.


    globe = {};
Feature flags from Modernizr

globe.support.touch


globe.support.applicationcache


respond.mediaQueriesSupported
Internet Explorer Flags
<!--[if lt IE 7 ]> <html lang="en"
class="ie ie6"> <![endif]-->




globe.browser.ie6 =
    document.documentElement
    .className.indexOf( “ie6” ) >= 0;
Again, with the @media
globe.enhanced =
    respond.mediaQueriesSupported
       || globe.browser.ie6
       || globe.browser.ie7
       || globe.browser.ie8;


            Conditional-comment driven
JS Experience Divide
if( !globe.enhanced ){
    //last stop for old browsers!
    return;
}
else{
    //remove Basic CSS
    //bring on the enhancements
}
And one caveat...

No Enhanced JS for BB5
      great browser, too slow.
No JS? That’s okay.
On removing Basic.css...

  head.removeChild( basicCSS );



• Convenient when basic.css does
  not easily cascade.
• A convenience that can’t be
  guaranteed.
Enhancing Further
Loading Assets
Enhanced page weight
  Different for every browser. Highly optimized.
The assets you receive depend on

width, section, features
          ~ hand-crafted delivery ~
Defining Assets to Load


//Arrays of JS and CSS files
globe.jsToLoad    = [ “jquery.js” ];
globe.cssToLoad = [];


                 jQuery is dynamically-loaded too!
Feature-based Loading


if( globe.support.touch ){
    jsToLoad.push( “touchEvents.js” );
}
Section-specific Loading


if( globe.hasClass( “gallery”, body ) ){
     jsToLoad.push( “galleries.js” );
}
Device Size Decisions


if( window.screen.width > 500 ){
    cssToLoad.push( “fonts.css” );
}
            screen, not window
Our width usage rule of thumb:

screen           for assets
window           for design
Why Screen, not viewport?
 • Fixed per device
 • Assets delivered to device’s
   potential, not just current state.

 • Orientation-change makes resize
   relevant again.
Pack & Load
globe.load.script(

     jsToLoad.join(",")

);



globe.load.style(

     cssToLoad.join(",")

);
Again, concat.

“js/file1.js,file2.js,file3.js”



          Minify + Gzip
Responsive Behavior
Collapsible Sections
We value all input...
On the desktop...



            photo: flickrich
...and on the device


Touch & Mouse
Events




Mouse Events
Normalized Events
• vclick
• vmousedown
• vmouseover
• vmouseup
• vmousecancel
Click - or - Gesture
Drag pagination
http://filamentgroup.com/lab/jquery_mobile_pagination_plugin/
#!hashbang
Single-Page Apps
 Less JS execution, faster page loads
Degrees of #!%$hashbang

Not great:                    Less... not great:
<a href=”#foo.html”>Foo</a>   <a href=”foo.html”>Foo</a>




         http://example.com/#!foo.html
Great:
history.replaceState

http://example.com/#!foo.html




 http://example.com/foo.html
...in code.
window.addEventListener(
  “hashchange”,
  function(){

     history.replaceState(
        {},
        document.title,
        location.hash.replace("#!","" )
     );

  }, false );
Many ways to “Save”
Hidden Touch Interface
Even save without JS




                 Simple Form
PE + offline is possible!
 Extends the ability for a site to meet you where you are
Accessibility
enhancements
Keep it accessible
Keys + WAI ARIA
audible interface
pairs with mobile, resolution-independent
One-Web Challenges
Content Negotiation
Landing pages are heavy
    What if we treat them like navigation?
Anchor-Include Pattern

<a href=”path/to/weather.html”
data-after=”path/to/weather-fragment.html”>
T</a>




https://gist.github.com/983328
Ideal Delivery


  In page source




 Delivered via Ajax
Ads.
Responsive & Responsible: Implementing Responsive Design at Scale
Ads are not awesome.
• Third-party, potential for conflicts
• They block content loading
• Potentially overtake page
• Pixel dimensions, contractually
• Filled with document.write
Best. Line. Ever.


document.write( “...<noscript>..” );
How we “solve” ads:

   <iframe>
Dynamically injected, naturally.
Resize + Hide + Append
Where to append?
CSS:


@media all and (min-width: 500px){
  .a .ad { display: none; }
}
JavaScript:


//on window resize:
if( !$( “.ad” ).is( “:visible” ) ){
  $( “.ad” ).appendTo( “.b” );
}
Edge Caching
   Not an edge-case.
Responsive & Responsible: Implementing Responsive Design at Scale
In conclusion...

 We have the tools
to build sites that are rich without being exclusive.
Responsive & Responsible: Implementing Responsive Design at Scale
What about “apps?”
FlipPics

http://bit.ly/pBJciO
Responsive & Responsible: Implementing Responsive Design at Scale
thanks everyone.
      @scottjehl

More Related Content

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
PDF
MongoDB .local London 2019: Managing Diverse User Needs with MongoDB and SQL
PDF
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
PDF
From RDBMS to MongoDB
PDF
MongoDB World 2019: MongoDB in Data Science: How to Build a Scalable Product ...
PDF
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
PPTX
MongoDB and Azure Databricks
PDF
MongoDB World 2019: Ticketek: Scaling to Global Ticket Sales with MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB .local London 2019: Managing Diverse User Needs with MongoDB and SQL
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
From RDBMS to MongoDB
MongoDB World 2019: MongoDB in Data Science: How to Build a Scalable Product ...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB and Azure Databricks
MongoDB World 2019: Ticketek: Scaling to Global Ticket Sales with MongoDB Atlas

What's hot (20)

PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
PDF
MongoDB Ops Manager + Kubernetes
PDF
MongoDB .local Munich 2019: Mastering MongoDB on Kubernetes – MongoDB Enterpr...
PDF
MongoDB .local Chicago 2019: MongoDB Atlas Data Lake Technical Deep Dive
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
PDF
MongoDB .local Toronto 2019: MongoDB Atlas Search Deep Dive
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
PDF
10 - MongoDB
PPTX
A Free New World: Atlas Free Tier and How It Was Born
PPTX
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
PPTX
A Presentation on MongoDB Introduction - Habilelabs
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
PPTX
Introduction To MongoDB
PPTX
Transitioning from SQL to MongoDB
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
PPTX
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
PDF
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
PDF
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB Ops Manager + Kubernetes
MongoDB .local Munich 2019: Mastering MongoDB on Kubernetes – MongoDB Enterpr...
MongoDB .local Chicago 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local Toronto 2019: MongoDB Atlas Search Deep Dive
MongoDB SoCal 2020: MongoDB Atlas Jump Start
10 - MongoDB
A Free New World: Atlas Free Tier and How It Was Born
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
A Presentation on MongoDB Introduction - Habilelabs
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
Introduction To MongoDB
Transitioning from SQL to MongoDB
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
Ad

Similar to Responsive & Responsible: Implementing Responsive Design at Scale (20)

PPTX
Mobile Best Practices
PDF
Monkeytalk Fall 2012 - Responsive Web Design
PPTX
Talk 03 responsive-web-design
KEY
The future of BYU web design
PDF
Now you see me... Adaptive Web Design and Development
PPTX
A Day Building Fast, Responsive, Extensible Single Page Applications
PDF
Responsive Design
PPTX
Responsive Web Design
PDF
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
PDF
Responsive web - CC FE & UX
PDF
Responsive Design: Building for a Modern Web
PDF
Great Responsive-ability Web Design
PDF
Adapting to Responsive Design - HCID2014, 24 April 2014
PDF
HCID2014: Adapting to responsive web design. Matt Gibson, Cyber-duck
PDF
Responsive Design
PDF
Responsive Websites
PDF
Responsive Design: The "other" way of doing mobile sites.
PDF
Introduction to Responsive Design v.2
PDF
Html 5 mobile - nitty gritty
PDF
Adapting to a Responsive Web Design - TFM&A - 26-02-14
Mobile Best Practices
Monkeytalk Fall 2012 - Responsive Web Design
Talk 03 responsive-web-design
The future of BYU web design
Now you see me... Adaptive Web Design and Development
A Day Building Fast, Responsive, Extensible Single Page Applications
Responsive Design
Responsive Web Design
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Responsive web - CC FE & UX
Responsive Design: Building for a Modern Web
Great Responsive-ability Web Design
Adapting to Responsive Design - HCID2014, 24 April 2014
HCID2014: Adapting to responsive web design. Matt Gibson, Cyber-duck
Responsive Design
Responsive Websites
Responsive Design: The "other" way of doing mobile sites.
Introduction to Responsive Design v.2
Html 5 mobile - nitty gritty
Adapting to a Responsive Web Design - TFM&A - 26-02-14
Ad

Recently uploaded (20)

PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Cloud computing and distributed systems.
PDF
Electronic commerce courselecture one. Pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Approach and Philosophy of On baking technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
KodekX | Application Modernization Development
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
NewMind AI Monthly Chronicles - July 2025
Network Security Unit 5.pdf for BCA BBA.
Cloud computing and distributed systems.
Electronic commerce courselecture one. Pdf
Unlocking AI with Model Context Protocol (MCP)
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Understanding_Digital_Forensics_Presentation.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Approach and Philosophy of On baking technology
Building Integrated photovoltaic BIPV_UPV.pdf
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
KodekX | Application Modernization Development
Chapter 3 Spatial Domain Image Processing.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding

Responsive & Responsible: Implementing Responsive Design at Scale