SlideShare una empresa de Scribd logo
1 de 53
Descargar para leer sin conexión
Responsive web standards?




                             Chris Mills
                        Opera Software/W3C

Friday, 7 December 12
Who am I?


          *        Works for Opera and W3C
          *        Open standards evangelist
          *        HTML5/CSS3 wrangler
          *        Accessibility whinger
          *        Education agitator
          *        Heavy metal drummer



Responsive web standards?                      Chris Mills
Friday, 7 December 12
Useful stuff

                                @chrisdavidmills
                        cmills@opera.com/cmills@w3.org
                         slideshare.net/chrisdavidmills
                                webplatform.org
                                 dev.opera.com




Friday, 7 December 12
A question




          Do web standards provide a good set of
          tools for responsive web design?




Responsive web standards?                    Chris Mills
Friday, 7 December 12
The answer




          We’re getting there ;-)




Responsive web standards?            Chris Mills
Friday, 7 December 12
But the road has been hard




Friday, 7 December 12
CSS first existed circa 1996




Responsive web standards?                         Chris Mills
Friday, 7 December 12
But ... browser support?
          <table width="100%" style="height: 100%;" cellpadding="10" cellspacing="0"
          border="0">
          <tr>
          <!-- ============ HEADER SECTION ============== -->
          <td colspan="2" style="height: 100px;" bgcolor="#777d6a"><h1>Website
          Logo</h1></td></tr>

          <tr>
          <!-- ============ LEFT COLUMN (MENU) ============== -->
          <td width="20%" valign="top" bgcolor="#999f8e">
          <a href="#">Menu link</a><br>
          <a href="#">Menu link</a><br>
          <a href="#">Menu link</a><br>
          <a href="#">Menu link</a><br>
          <a href="#">Menu link</a>
          </td>

Responsive web standards?                                                   Chris Mills
Friday, 7 December 12
CSS 1 and 2 had very few...


          ...RWD-friendly features


          Because RWD problems didn’t exist back
          then!




Responsive web standards?                         Chris Mills
Friday, 7 December 12
Layout tools?


          Then again CSS2 has few layout tools ...


          Period.




Responsive web standards?                     Chris Mills
Friday, 7 December 12
We still abuse floats and padding


          And positioning is good.


          But doesn’t solve everything.




Responsive web standards?                 Chris Mills
Friday, 7 December 12
CSS2 has media types


          But they are largely flawed
          media=”screen”, media=”print”
          media=”handheld”, media=”tv”
          media=”wtf?”




Responsive web standards?                      Chris Mills
Friday, 7 December 12
Surely they are all really “screen”?




Friday, 7 December 12
<img> was never responsive




          We had no need for responsive images
          when <img> was created




Responsive web standards?                        Chris Mills
Friday, 7 December 12
And we’ve never had...

          *        “Proper” layout modules
          *        Feature detection
          *        Access to hardware features
          *        whinge whinge whinge...
          *        ...I want it all yesterday...
          *        ...etc.




Responsive web standards?                          Chris Mills
Friday, 7 December 12
Whinge over




Responsive web standards?             Chris Mills
Friday, 7 December 12
The W3C process is long




Responsive web standards?                         Chris Mills
Friday, 7 December 12
The W3C process is long


          *        A problem first has to present itself
          *        Someone has to propose a solution
          *        Which has to be agreed by committee
          *        After checking for the “P” word
          *        And then implemented by browsers
          *        And then adopted by developers



Responsive web standards?                            Chris Mills
Friday, 7 December 12
Media queries succeed...




          ...where media types failed




Responsive web standards?                          Chris Mills
Friday, 7 December 12
Media queries


          media="screen and (max-width: 481px)"


          @media screen and (max-width: 481px) {
            /* do amazing stuff for
              narrow screens */
          }



Responsive web standards?                     Chris Mills
Friday, 7 December 12
Media queries




Responsive web standards?               Chris Mills
Friday, 7 December 12
Viewport is also necessary




          For making mobile browsers behave!




Responsive web standards?                        Chris Mills
Friday, 7 December 12
Viewport is also necessary




Responsive web standards?                        Chris Mills
Friday, 7 December 12
Viewport is also necessary




          <meta name="viewport"
          content="width=device-width">




Responsive web standards?                        Chris Mills
Friday, 7 December 12
CSS device adaptation spec




          Does viewport stuff ... in CSS




Responsive web standards?                        Chris Mills
Friday, 7 December 12
CSS device adaptation spec
          <meta name="viewport"
           content="width=550,
           maximum-scale=1.0,
           target-densitydpi=device-dpi">


          @viewport {
            width: 550px;
            max-zoom: 1;
            resolution: device;
          }

Responsive web standards?                        Chris Mills
Friday, 7 December 12
CSS4 media queries


          *        script
          *        hover
          *        pointer (none/coarse/fine)
          *        luminosity (dim/normal/washed)




Responsive web standards?                           Chris Mills
Friday, 7 December 12
Other media query ideas


          *        paged
          *        interactive
          *         touch
          *        keyboard
          *        remote
          *        network-speed



Responsive web standards?                         Chris Mills
Friday, 7 December 12
CSS3 features “proper” layout


          *        Flexbox
          *        Multi-col layout
          *        Grids
          *        Regions
          *        Exclusions and shapes
          *        GCPM



Responsive web standards?                  Chris Mills
Friday, 7 December 12
Example: Flexbox


          *        Easier UI layout
          *        Makes layout tasks much easier
          *        Cross browser support getting there
          *        Great for mobile UIs




Responsive web standards?                          Chris Mills
Friday, 7 December 12
Example: Flexbox


          <section>
           <article id="first"></article>
           <article id="second"></article>
           <article id="third"></article>
          </section>




Responsive web standards?                    Chris Mills
Friday, 7 December 12
Responsive web standards?   Chris Mills
Friday, 7 December 12
Example: Flexbox

          section {
            display: flex;
            flex-flow: row;
          }


          section {
            display: flex;
            flex-flow: column;
          }
Responsive web standards?                  Chris Mills
Friday, 7 December 12
Responsive web standards?   Chris Mills
Friday, 7 December 12
Example: Flexbox


          section {
            display: flex;
            flex-flow: row;
            align-items: center;
          }




Responsive web standards?                  Chris Mills
Friday, 7 December 12
Responsive web standards?   Chris Mills
Friday, 7 December 12
Example: Flexbox


          #first, #third {
            order: 2;
          }


          #second {
            order: 1;
          }

Responsive web standards?                  Chris Mills
Friday, 7 December 12
Responsive web standards?   Chris Mills
Friday, 7 December 12
Example: Flexbox
          #first {
            flex: 1;
          }


          #second {
            flex: 1;
          }


          #third {
            flex: 1;
          }
Responsive web standards?                  Chris Mills
Friday, 7 December 12
Responsive web standards?   Chris Mills
Friday, 7 December 12
Example: Flexbox
          #first {
            flex: 1;
          }


          #second {
            flex: 1;
          }


          #third {
            flex: 2;
          }
Responsive web standards?                  Chris Mills
Friday, 7 December 12
Responsive web standards?   Chris Mills
Friday, 7 December 12
Responsive replaced elements

          * max-width: 100% ...
          * HTML5 <video>: <source> media
          attributes
          * <picture>




Responsive web standards?                         Chris Mills
Friday, 7 December 12
HTML5 <video>


          <source src="crystal320.webm"
          type="video/webm" media="all and (max-
          width: 480px)">
             <source src="crystal720.webm"
          type="video/webm" media="all and (min-
          width: 481px)">



Responsive web standards?                    Chris Mills
Friday, 7 December 12
The <picture> element

          <picture alt="a picture of something">
           <source src="mobile.jpg">
           <source src="medium.jpg" media="min-
                  width: 600px">
           <source src="fullsize.jpg" media="min-
                  width: 900px">
           <img src="mobile.jpg">
           <!-- fallback for
                non-supporting browsers -->
          </picture>
Responsive web standards?                           Chris Mills
Friday, 7 December 12
Other useful image features


          * object-fit / object-position
          * background-image:
          image('image.png#xywh=150,250,100,100');
          * background-image: image("wavy.svg",
          'wavy.png' , "wavy.gif");




Responsive web standards?                        Chris Mills
Friday, 7 December 12
object-fit/object-position


          img {
            width: 300px;
            height: 300px;
            ...
            object-fit: contain;
          }




Responsive web standards?                        Chris Mills
Friday, 7 December 12
Image fragments




          background-image:
          image('image.png#xywh=15,30,150,120');

Responsive web standards?                          Chris Mills
Friday, 7 December 12
Misc responsive features


          * matchMedia
          * Native feature detection with
          @supports
          * CSS3 web fonts for icons
          * unicode-range




Responsive web standards?                          Chris Mills
Friday, 7 December 12
matchMedia


          if (window.matchMedia("(min-width:
          400px)").matches) {
            /* Do stuff for wider screens */
          } else {
            /* Do stuff for narrow screens */
          }




Responsive web standards?                       Chris Mills
Friday, 7 December 12
@supports


          @supports (display:flex) {
            section { display: flex }
            ...
          }




Responsive web standards?               Chris Mills
Friday, 7 December 12
unicode-range


          @font-face {
            font-family: myFont;
            src: local(myFont), url(/fonts/myFont.otf);
            unicode-range: U+000-49F, U+2000-27FF;
          }




Responsive web standards?                           Chris Mills
Friday, 7 December 12
Thanks!

                                @chrisdavidmills
                        cmills@opera.com/cmills@w3.org
                         slideshare.net/chrisdavidmills
                                webplatform.org
                                 dev.opera.com




Friday, 7 December 12

Más contenido relacionado

Destacado

Actividad1y2.aguilar manriquezmariacristinacomunicacion
Actividad1y2.aguilar manriquezmariacristinacomunicacionActividad1y2.aguilar manriquezmariacristinacomunicacion
Actividad1y2.aguilar manriquezmariacristinacomunicacion
cristaliz
 
Bartolomé de las Casas haridian cathaysa marlene y tamara
Bartolomé de las Casas haridian cathaysa marlene y tamaraBartolomé de las Casas haridian cathaysa marlene y tamara
Bartolomé de las Casas haridian cathaysa marlene y tamara
aybaben
 
Los monstruos locos.
Los monstruos locos.Los monstruos locos.
Los monstruos locos.
jesus
 
Jornadas Conmemorativas del 700 aniversario de la Sinagoga de Córdoba
Jornadas Conmemorativas del 700 aniversario de la Sinagoga de CórdobaJornadas Conmemorativas del 700 aniversario de la Sinagoga de Córdoba
Jornadas Conmemorativas del 700 aniversario de la Sinagoga de Córdoba
José Moraga Campos
 
Presentación catálogo volare
Presentación catálogo volarePresentación catálogo volare
Presentación catálogo volare
Luz Amparo Cerón
 
Lmc fuck yeah (19 diapositives)
Lmc fuck yeah (19 diapositives)Lmc fuck yeah (19 diapositives)
Lmc fuck yeah (19 diapositives)
Cintthy JacObo
 

Destacado (20)

Traduccion de Synchronous e-Learning, The elearning GUILD
Traduccion de Synchronous e-Learning, The elearning GUILDTraduccion de Synchronous e-Learning, The elearning GUILD
Traduccion de Synchronous e-Learning, The elearning GUILD
 
Pico y sex. erotismo
Pico y sex. erotismoPico y sex. erotismo
Pico y sex. erotismo
 
Actividad1y2.aguilar manriquezmariacristinacomunicacion
Actividad1y2.aguilar manriquezmariacristinacomunicacionActividad1y2.aguilar manriquezmariacristinacomunicacion
Actividad1y2.aguilar manriquezmariacristinacomunicacion
 
Bartolomé de las Casas haridian cathaysa marlene y tamara
Bartolomé de las Casas haridian cathaysa marlene y tamaraBartolomé de las Casas haridian cathaysa marlene y tamara
Bartolomé de las Casas haridian cathaysa marlene y tamara
 
18 educational models for use the DIGITAL WHITEBOARD (DWB)
18 educational models for use the DIGITAL WHITEBOARD (DWB)18 educational models for use the DIGITAL WHITEBOARD (DWB)
18 educational models for use the DIGITAL WHITEBOARD (DWB)
 
Los monstruos locos.
Los monstruos locos.Los monstruos locos.
Los monstruos locos.
 
Jornadas Conmemorativas del 700 aniversario de la Sinagoga de Córdoba
Jornadas Conmemorativas del 700 aniversario de la Sinagoga de CórdobaJornadas Conmemorativas del 700 aniversario de la Sinagoga de Córdoba
Jornadas Conmemorativas del 700 aniversario de la Sinagoga de Córdoba
 
Tesis perfil lipídico de cuyes en crecimiento en el cere pampa del arco aya...
Tesis perfil lipídico de cuyes en crecimiento en el cere pampa del arco   aya...Tesis perfil lipídico de cuyes en crecimiento en el cere pampa del arco   aya...
Tesis perfil lipídico de cuyes en crecimiento en el cere pampa del arco aya...
 
German vocabulary list
German vocabulary listGerman vocabulary list
German vocabulary list
 
Catalogo
CatalogoCatalogo
Catalogo
 
53º Cometa Cena
53º Cometa Cena53º Cometa Cena
53º Cometa Cena
 
Direccion de investigación
Direccion de investigaciónDireccion de investigación
Direccion de investigación
 
Presentación catálogo volare
Presentación catálogo volarePresentación catálogo volare
Presentación catálogo volare
 
How to Guide Innovation in a Changing Education Ecosystem?
How to Guide Innovation in a Changing Education Ecosystem?How to Guide Innovation in a Changing Education Ecosystem?
How to Guide Innovation in a Changing Education Ecosystem?
 
Gerber Life Insurance Advertising Analytics - EverydayFamily.com
Gerber Life Insurance Advertising Analytics - EverydayFamily.comGerber Life Insurance Advertising Analytics - EverydayFamily.com
Gerber Life Insurance Advertising Analytics - EverydayFamily.com
 
Objetivos y opciones, Jacobo Pastor García Villarreal
Objetivos y opciones, Jacobo Pastor García VillarrealObjetivos y opciones, Jacobo Pastor García Villarreal
Objetivos y opciones, Jacobo Pastor García Villarreal
 
Suresh chandra ebusiness
Suresh chandra ebusinessSuresh chandra ebusiness
Suresh chandra ebusiness
 
Lmc fuck yeah (19 diapositives)
Lmc fuck yeah (19 diapositives)Lmc fuck yeah (19 diapositives)
Lmc fuck yeah (19 diapositives)
 
Clase 5 quim. inorganica cualitativa
Clase 5 quim. inorganica cualitativaClase 5 quim. inorganica cualitativa
Clase 5 quim. inorganica cualitativa
 
Proyecto final 102058_219_ (3)
Proyecto final 102058_219_ (3)Proyecto final 102058_219_ (3)
Proyecto final 102058_219_ (3)
 

Similar a Responsive web design standards?

Performance & Responsive Web Design
Performance & Responsive Web DesignPerformance & Responsive Web Design
Performance & Responsive Web Design
Zach Leatherman
 
Environmental Design Vol. 2
Environmental Design Vol. 2Environmental Design Vol. 2
Environmental Design Vol. 2
Tim Wright
 
Responsive Web Design & the state of the Web
Responsive Web Design & the state of the WebResponsive Web Design & the state of the Web
Responsive Web Design & the state of the Web
Yiannis Konstantakopoulos
 
Keys to Responsive Design
Keys to Responsive DesignKeys to Responsive Design
Keys to Responsive Design
Tim Wright
 
Responsive Web Design - What You Need to Know to Get Started
Responsive Web Design - What You Need to Know to Get StartedResponsive Web Design - What You Need to Know to Get Started
Responsive Web Design - What You Need to Know to Get Started
jennybchicken
 

Similar a Responsive web design standards? (20)

Responsive Web Design &amp; Workflow
Responsive Web Design &amp; WorkflowResponsive Web Design &amp; Workflow
Responsive Web Design &amp; Workflow
 
Web Performance & You
Web Performance & YouWeb Performance & You
Web Performance & You
 
Keeping responsive into the future by Chris mills
Keeping responsive into the future by Chris millsKeeping responsive into the future by Chris mills
Keeping responsive into the future by Chris mills
 
Adapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the futureAdapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the future
 
Responsive & Adaptive Web Design
Responsive & Adaptive Web DesignResponsive & Adaptive Web Design
Responsive & Adaptive Web Design
 
Performance & Responsive Web Design
Performance & Responsive Web DesignPerformance & Responsive Web Design
Performance & Responsive Web Design
 
HTML5 and Sencha Touch
HTML5 and Sencha TouchHTML5 and Sencha Touch
HTML5 and Sencha Touch
 
NCDevCon2012_designing the mobile experience
NCDevCon2012_designing the mobile experienceNCDevCon2012_designing the mobile experience
NCDevCon2012_designing the mobile experience
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
05 Mobile CSS
05 Mobile CSS05 Mobile CSS
05 Mobile CSS
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Environmental Design Vol. 2
Environmental Design Vol. 2Environmental Design Vol. 2
Environmental Design Vol. 2
 
7 common problems with salesforce data migration
7 common problems with salesforce data migration7 common problems with salesforce data migration
7 common problems with salesforce data migration
 
Responsive Web Design & the state of the Web
Responsive Web Design & the state of the WebResponsive Web Design & the state of the Web
Responsive Web Design & the state of the Web
 
Responsive widget-design-with-word press
Responsive widget-design-with-word pressResponsive widget-design-with-word press
Responsive widget-design-with-word press
 
Keys to Responsive Design
Keys to Responsive DesignKeys to Responsive Design
Keys to Responsive Design
 
Cloud4all Architecture Overview
Cloud4all Architecture OverviewCloud4all Architecture Overview
Cloud4all Architecture Overview
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
 
Responsive Web Design - What You Need to Know to Get Started
Responsive Web Design - What You Need to Know to Get StartedResponsive Web Design - What You Need to Know to Get Started
Responsive Web Design - What You Need to Know to Get Started
 
Is everything we used to do wrong?
Is everything we used to do wrong?Is everything we used to do wrong?
Is everything we used to do wrong?
 

Más de Chris Mills

Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"
Chris Mills
 
Documentation and publishing
Documentation and publishingDocumentation and publishing
Documentation and publishing
Chris Mills
 

Más de Chris Mills (20)

More efficient, usable web
More efficient, usable webMore efficient, usable web
More efficient, usable web
 
Feedback handling, community wrangling, panhandlin’
Feedback handling, community wrangling, panhandlin’Feedback handling, community wrangling, panhandlin’
Feedback handling, community wrangling, panhandlin’
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
 
Guerrilla education
Guerrilla educationGuerrilla education
Guerrilla education
 
Web versus Native: round 1!
Web versus Native: round 1!Web versus Native: round 1!
Web versus Native: round 1!
 
BrazilJS MDN
BrazilJS MDNBrazilJS MDN
BrazilJS MDN
 
Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"
 
Documentation and publishing
Documentation and publishingDocumentation and publishing
Documentation and publishing
 
MDN is easy!
MDN is easy!MDN is easy!
MDN is easy!
 
Getting rid of images with CSS
Getting rid of images with CSSGetting rid of images with CSS
Getting rid of images with CSS
 
Future layouts
Future layoutsFuture layouts
Future layouts
 
Laying out the future
Laying out the futureLaying out the future
Laying out the future
 
Accessibility doesn't exist
Accessibility doesn't existAccessibility doesn't exist
Accessibility doesn't exist
 
Adapt! Media queries and viewport
Adapt! Media queries and viewportAdapt! Media queries and viewport
Adapt! Media queries and viewport
 
Angels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusiveAngels versus demons: balancing shiny and inclusive
Angels versus demons: balancing shiny and inclusive
 
HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?
 
The W3C and the web design ecosystem
The W3C and the web design ecosystemThe W3C and the web design ecosystem
The W3C and the web design ecosystem
 
HTML5 Pearson preso
HTML5 Pearson presoHTML5 Pearson preso
HTML5 Pearson preso
 
Brave new world of HTML5
Brave new world of HTML5Brave new world of HTML5
Brave new world of HTML5
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Responsive web design standards?

  • 1. Responsive web standards? Chris Mills Opera Software/W3C Friday, 7 December 12
  • 2. Who am I? * Works for Opera and W3C * Open standards evangelist * HTML5/CSS3 wrangler * Accessibility whinger * Education agitator * Heavy metal drummer Responsive web standards? Chris Mills Friday, 7 December 12
  • 3. Useful stuff @chrisdavidmills cmills@opera.com/cmills@w3.org slideshare.net/chrisdavidmills webplatform.org dev.opera.com Friday, 7 December 12
  • 4. A question Do web standards provide a good set of tools for responsive web design? Responsive web standards? Chris Mills Friday, 7 December 12
  • 5. The answer We’re getting there ;-) Responsive web standards? Chris Mills Friday, 7 December 12
  • 6. But the road has been hard Friday, 7 December 12
  • 7. CSS first existed circa 1996 Responsive web standards? Chris Mills Friday, 7 December 12
  • 8. But ... browser support? <table width="100%" style="height: 100%;" cellpadding="10" cellspacing="0" border="0"> <tr> <!-- ============ HEADER SECTION ============== --> <td colspan="2" style="height: 100px;" bgcolor="#777d6a"><h1>Website Logo</h1></td></tr> <tr> <!-- ============ LEFT COLUMN (MENU) ============== --> <td width="20%" valign="top" bgcolor="#999f8e"> <a href="#">Menu link</a><br> <a href="#">Menu link</a><br> <a href="#">Menu link</a><br> <a href="#">Menu link</a><br> <a href="#">Menu link</a> </td> Responsive web standards? Chris Mills Friday, 7 December 12
  • 9. CSS 1 and 2 had very few... ...RWD-friendly features Because RWD problems didn’t exist back then! Responsive web standards? Chris Mills Friday, 7 December 12
  • 10. Layout tools? Then again CSS2 has few layout tools ... Period. Responsive web standards? Chris Mills Friday, 7 December 12
  • 11. We still abuse floats and padding And positioning is good. But doesn’t solve everything. Responsive web standards? Chris Mills Friday, 7 December 12
  • 12. CSS2 has media types But they are largely flawed media=”screen”, media=”print” media=”handheld”, media=”tv” media=”wtf?” Responsive web standards? Chris Mills Friday, 7 December 12
  • 13. Surely they are all really “screen”? Friday, 7 December 12
  • 14. <img> was never responsive We had no need for responsive images when <img> was created Responsive web standards? Chris Mills Friday, 7 December 12
  • 15. And we’ve never had... * “Proper” layout modules * Feature detection * Access to hardware features * whinge whinge whinge... * ...I want it all yesterday... * ...etc. Responsive web standards? Chris Mills Friday, 7 December 12
  • 16. Whinge over Responsive web standards? Chris Mills Friday, 7 December 12
  • 17. The W3C process is long Responsive web standards? Chris Mills Friday, 7 December 12
  • 18. The W3C process is long * A problem first has to present itself * Someone has to propose a solution * Which has to be agreed by committee * After checking for the “P” word * And then implemented by browsers * And then adopted by developers Responsive web standards? Chris Mills Friday, 7 December 12
  • 19. Media queries succeed... ...where media types failed Responsive web standards? Chris Mills Friday, 7 December 12
  • 20. Media queries media="screen and (max-width: 481px)" @media screen and (max-width: 481px) { /* do amazing stuff for narrow screens */ } Responsive web standards? Chris Mills Friday, 7 December 12
  • 21. Media queries Responsive web standards? Chris Mills Friday, 7 December 12
  • 22. Viewport is also necessary For making mobile browsers behave! Responsive web standards? Chris Mills Friday, 7 December 12
  • 23. Viewport is also necessary Responsive web standards? Chris Mills Friday, 7 December 12
  • 24. Viewport is also necessary <meta name="viewport" content="width=device-width"> Responsive web standards? Chris Mills Friday, 7 December 12
  • 25. CSS device adaptation spec Does viewport stuff ... in CSS Responsive web standards? Chris Mills Friday, 7 December 12
  • 26. CSS device adaptation spec <meta name="viewport" content="width=550, maximum-scale=1.0, target-densitydpi=device-dpi"> @viewport { width: 550px; max-zoom: 1; resolution: device; } Responsive web standards? Chris Mills Friday, 7 December 12
  • 27. CSS4 media queries * script * hover * pointer (none/coarse/fine) * luminosity (dim/normal/washed) Responsive web standards? Chris Mills Friday, 7 December 12
  • 28. Other media query ideas * paged * interactive * touch * keyboard * remote * network-speed Responsive web standards? Chris Mills Friday, 7 December 12
  • 29. CSS3 features “proper” layout * Flexbox * Multi-col layout * Grids * Regions * Exclusions and shapes * GCPM Responsive web standards? Chris Mills Friday, 7 December 12
  • 30. Example: Flexbox * Easier UI layout * Makes layout tasks much easier * Cross browser support getting there * Great for mobile UIs Responsive web standards? Chris Mills Friday, 7 December 12
  • 31. Example: Flexbox <section> <article id="first"></article> <article id="second"></article> <article id="third"></article> </section> Responsive web standards? Chris Mills Friday, 7 December 12
  • 32. Responsive web standards? Chris Mills Friday, 7 December 12
  • 33. Example: Flexbox section { display: flex; flex-flow: row; } section { display: flex; flex-flow: column; } Responsive web standards? Chris Mills Friday, 7 December 12
  • 34. Responsive web standards? Chris Mills Friday, 7 December 12
  • 35. Example: Flexbox section { display: flex; flex-flow: row; align-items: center; } Responsive web standards? Chris Mills Friday, 7 December 12
  • 36. Responsive web standards? Chris Mills Friday, 7 December 12
  • 37. Example: Flexbox #first, #third { order: 2; } #second { order: 1; } Responsive web standards? Chris Mills Friday, 7 December 12
  • 38. Responsive web standards? Chris Mills Friday, 7 December 12
  • 39. Example: Flexbox #first { flex: 1; } #second { flex: 1; } #third { flex: 1; } Responsive web standards? Chris Mills Friday, 7 December 12
  • 40. Responsive web standards? Chris Mills Friday, 7 December 12
  • 41. Example: Flexbox #first { flex: 1; } #second { flex: 1; } #third { flex: 2; } Responsive web standards? Chris Mills Friday, 7 December 12
  • 42. Responsive web standards? Chris Mills Friday, 7 December 12
  • 43. Responsive replaced elements * max-width: 100% ... * HTML5 <video>: <source> media attributes * <picture> Responsive web standards? Chris Mills Friday, 7 December 12
  • 44. HTML5 <video> <source src="crystal320.webm" type="video/webm" media="all and (max- width: 480px)"> <source src="crystal720.webm" type="video/webm" media="all and (min- width: 481px)"> Responsive web standards? Chris Mills Friday, 7 December 12
  • 45. The <picture> element <picture alt="a picture of something"> <source src="mobile.jpg"> <source src="medium.jpg" media="min- width: 600px"> <source src="fullsize.jpg" media="min- width: 900px"> <img src="mobile.jpg"> <!-- fallback for non-supporting browsers --> </picture> Responsive web standards? Chris Mills Friday, 7 December 12
  • 46. Other useful image features * object-fit / object-position * background-image: image('image.png#xywh=150,250,100,100'); * background-image: image("wavy.svg", 'wavy.png' , "wavy.gif"); Responsive web standards? Chris Mills Friday, 7 December 12
  • 47. object-fit/object-position img { width: 300px; height: 300px; ... object-fit: contain; } Responsive web standards? Chris Mills Friday, 7 December 12
  • 48. Image fragments background-image: image('image.png#xywh=15,30,150,120'); Responsive web standards? Chris Mills Friday, 7 December 12
  • 49. Misc responsive features * matchMedia * Native feature detection with @supports * CSS3 web fonts for icons * unicode-range Responsive web standards? Chris Mills Friday, 7 December 12
  • 50. matchMedia if (window.matchMedia("(min-width: 400px)").matches) { /* Do stuff for wider screens */ } else { /* Do stuff for narrow screens */ } Responsive web standards? Chris Mills Friday, 7 December 12
  • 51. @supports @supports (display:flex) { section { display: flex } ... } Responsive web standards? Chris Mills Friday, 7 December 12
  • 52. unicode-range @font-face { font-family: myFont; src: local(myFont), url(/fonts/myFont.otf); unicode-range: U+000-49F, U+2000-27FF; } Responsive web standards? Chris Mills Friday, 7 December 12
  • 53. Thanks! @chrisdavidmills cmills@opera.com/cmills@w3.org slideshare.net/chrisdavidmills webplatform.org dev.opera.com Friday, 7 December 12