SlideShare a Scribd company logo
1 of 15
Download to read offline
Progressive Enhancement in
the age of HTML5 and
CSS3
using Modernizr
                                        Paul Irish
                                        Molecular
                  NC jQuery & JavaScript Camp ’10
HTML5 & CSS3 Coolness™
HTML5 & CSS3 Coolness™
Rounded corners         2D Transformations
@font-face fonts        CSS Gradients
Canvas                  SVG
rgba(), hsla() colors   Geolocation
border-image            CSS Columns
box-shadow              HTML5 Forms
HTML5 Audio & Video     Web Workers
CSS Animations          Offline Web Apps
CSS Transitions         …and so on and so on.
ishtml5readyyet.com
ishtml5readyyet.com



                  U P !
  HU T wrong.
S    y   ou ’re
Modernizr
Making use of tomorrow’s technologies, today!
Feature Detection
     Just Detect It™
Native                    No Native
Implementation            Implementation
. box {                   .no-borderradius .box {
   // use border-radius      // maybe less padding?
}                         }

                          if (Modernizr.borderradius == false){
                              // call up DD_roundies, etc.
                          }
OM
    G it
onl     ’s
   y7
      k!
We got you covered, b.
Rounded corners         2D Transformations
@font-face fonts        CSS Gradients
Canvas                  SVG
rgba(), hsla() colors   Geolocation
border-image            CSS Columns
box-shadow              HTML5 Forms
HTML5 Audio & Video     Web Workers
CSS Animations          Offline Web Apps
CSS Transitions         …
We got you covered, b.
Rounded corners    2D                webGL
                   Transformations
@font-face fonts                     SMIL
                   CSS Gradients
Canvas                               hashchange
                   SVG               event
rgba(), hsla()
colors             Geolocation       localStorage
border-image       CSS Columns       sessionStorage
box-shadow         HTML5 Forms       postMessage
HTML5 Audio &      Web Workers       html5 drag ‘n
Video                                drop
                   Offline Web Apps
CSS Animations                       web sql
                   …and so on and    database
CSS Transitions    so on.
Modernizr
 http://modernizr.com
      @modernizr


Me:
 http://paulirish.com
      @paul_irish

                        Yah, it’s open source. Fork it, baby.

More Related Content

Similar to Modernizr - Detecting HTML5 and CSS3 support

HTML5 and SVG
HTML5 and SVGHTML5 and SVG
HTML5 and SVG
yarcub
 
Css3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQueryCss3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQuery
Andrea Verlicchi
 
Drawing in HTML5 Open House
Drawing in HTML5 Open HouseDrawing in HTML5 Open House
Drawing in HTML5 Open House
Noam Kfir
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
Bitla Software
 

Similar to Modernizr - Detecting HTML5 and CSS3 support (20)

Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
HTML5とIE10とWindows 8 in OSC2012会津
HTML5とIE10とWindows 8 in OSC2012会津HTML5とIE10とWindows 8 in OSC2012会津
HTML5とIE10とWindows 8 in OSC2012会津
 
Progressive Advancement, by way of progressive enhancement
Progressive Advancement, by way of progressive enhancementProgressive Advancement, by way of progressive enhancement
Progressive Advancement, by way of progressive enhancement
 
20111129 modernizr
20111129 modernizr20111129 modernizr
20111129 modernizr
 
HTML5 and SVG
HTML5 and SVGHTML5 and SVG
HTML5 and SVG
 
Css3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQueryCss3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQuery
 
Drawing in HTML5 Open House
Drawing in HTML5 Open HouseDrawing in HTML5 Open House
Drawing in HTML5 Open House
 
Svcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobileSvcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobile
 
CSS3: Ready for Primetime?
CSS3: Ready for Primetime?CSS3: Ready for Primetime?
CSS3: Ready for Primetime?
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
 
Understanding hardware acceleration on mobile browsers presentation
Understanding hardware acceleration on mobile browsers presentationUnderstanding hardware acceleration on mobile browsers presentation
Understanding hardware acceleration on mobile browsers presentation
 
Understanding Hardware Acceleration on Mobile Browsers
Understanding Hardware Acceleration on Mobile BrowsersUnderstanding Hardware Acceleration on Mobile Browsers
Understanding Hardware Acceleration on Mobile Browsers
 
HTML5 & Friends
HTML5 & FriendsHTML5 & Friends
HTML5 & Friends
 
SVGD3Angular2React
SVGD3Angular2ReactSVGD3Angular2React
SVGD3Angular2React
 
Next generation Graphics: SVG
Next generation Graphics: SVGNext generation Graphics: SVG
Next generation Graphics: SVG
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016
 
Css3 101
Css3 101Css3 101
Css3 101
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
HTML 5 & CSS 3
HTML 5 & CSS 3HTML 5 & CSS 3
HTML 5 & CSS 3
 

More from Paul Irish

More from Paul Irish (7)

An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
 
webfonts & @font-face :: in brief
webfonts & @font-face :: in briefwebfonts & @font-face :: in brief
webfonts & @font-face :: in brief
 
Squeezing The Best Out Of Webfonts
Squeezing The Best Out Of WebfontsSqueezing The Best Out Of Webfonts
Squeezing The Best Out Of Webfonts
 
Employing Custom Fonts
Employing Custom FontsEmploying Custom Fonts
Employing Custom Fonts
 
jQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & CompressionjQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & Compression
 
Practical Design Solutions from Japan
Practical Design Solutions from JapanPractical Design Solutions from Japan
Practical Design Solutions from Japan
 
Rich Typography Options For The Web - or - Why sIFR is Dead in 2009
Rich Typography Options For The Web - or - Why sIFR is Dead in 2009Rich Typography Options For The Web - or - Why sIFR is Dead in 2009
Rich Typography Options For The Web - or - Why sIFR is Dead in 2009
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

Modernizr - Detecting HTML5 and CSS3 support

  • 1. Progressive Enhancement in the age of HTML5 and CSS3 using Modernizr Paul Irish Molecular NC jQuery & JavaScript Camp ’10
  • 2. HTML5 & CSS3 Coolness™
  • 3. HTML5 & CSS3 Coolness™ Rounded corners 2D Transformations @font-face fonts CSS Gradients Canvas SVG rgba(), hsla() colors Geolocation border-image CSS Columns box-shadow HTML5 Forms HTML5 Audio & Video Web Workers CSS Animations Offline Web Apps CSS Transitions …and so on and so on.
  • 5. ishtml5readyyet.com U P ! HU T wrong. S y ou ’re
  • 6. Modernizr Making use of tomorrow’s technologies, today!
  • 7.
  • 8. Feature Detection Just Detect It™
  • 9.
  • 10. Native No Native Implementation Implementation . box { .no-borderradius .box { // use border-radius // maybe less padding? } } if (Modernizr.borderradius == false){ // call up DD_roundies, etc. }
  • 11.
  • 12. OM G it onl ’s y7 k!
  • 13. We got you covered, b. Rounded corners 2D Transformations @font-face fonts CSS Gradients Canvas SVG rgba(), hsla() colors Geolocation border-image CSS Columns box-shadow HTML5 Forms HTML5 Audio & Video Web Workers CSS Animations Offline Web Apps CSS Transitions …
  • 14. We got you covered, b. Rounded corners 2D webGL Transformations @font-face fonts SMIL CSS Gradients Canvas hashchange SVG event rgba(), hsla() colors Geolocation localStorage border-image CSS Columns sessionStorage box-shadow HTML5 Forms postMessage HTML5 Audio & Web Workers html5 drag ‘n Video drop Offline Web Apps CSS Animations web sql …and so on and database CSS Transitions so on.
  • 15. Modernizr http://modernizr.com @modernizr Me: http://paulirish.com @paul_irish Yah, it’s open source. Fork it, baby.

Editor's Notes

  1. awesome shit! js solutions for many of these, but in 95% of cases, the result with the native css approach has a better result - responsive, faster, less code. transforms. transitions. @font-face
  2. omg is html5ready yet ?? UGH. the challenge is: how do you use these features across browsers, progressively enhancing where possible
  3. omg is html5ready yet ?? UGH. the challenge is: how do you use these features across browsers, progressively enhancing where possible
  4. in other words: super easy to have multiple levels of support in site, one for each degree of sophistication that’s how i ended up w/modernizr allows you to start using html5+css3 coolness today, and have full control over what your html,css and js do in browsers that don’t have features Which brings me to the most important part of this presentation:
  5. FEATURE DETECTION aka object detection is good sniffing is bad all browsers. future-proof
  6. FEATURE DETECTION aka object detection is good sniffing is bad all browsers. future-proof
  7. awesome shit! js solutions for many of these, but in 95% of cases, the result with the native css approach has a better result - responsive, faster, less code.