Skip to main content

Home/ CSS Evangelist/ Group items tagged modernizr

Rss Feed Group items tagged

Vernon Fowler

Web Designer Notebook » How to use Modernizr - 0 views

  • Modernizr doesn’t actually magically enable these properties for browsers that don’t support them. It just tells the page whether that feature is supported on the browser the visitor is using or not.
  • To install Modernizr, download the file from this page. Then, on your site’s head tag, add a link to the file. For example: ?1<script src="js/modernizr-1.0.min.js"></script> The second step is to include on your html tag a class of “no-js”: ?1<html class="no-js"> Why add this tag? Because that will be the default state of the page. If JavaScript (js) isn’t on, then Modernizr won’t work at all (and probably other features of your site won’t work either…), so it’s good that we have a fallback for that case. If JavaScript is indeed enabled, once that page is loaded on the browser, that class will be replaced dynamically and it may look something like this: ?1<html class="js canvas canvastext geolocation rgba hsla no-multiplebgs borderimage borderradius boxshadow opacity no-cssanimations csscolumns no-cssgradients no-cssreflections csstransforms no-csstransforms3d no-csstransitions  video audio cufon-active fontface cufon-ready">
  •  
    "There is a tool that came to make our lives as progressive web designers a bit easier: Modernizr. In this short tutorial, learn how to apply this handy script to maximum effect on your sites."
Vernon Fowler

Opera Developer News - Why use @supports instead of Modernizr? - 0 views

  • The reason to use @supports over Modernizr is performance; functionality that's built into the browser will always be faster than adding it in script. Removing an external dependancy saves an HTTP request to download Modernizr and doesn't require time to execute the JavaScript.
  • Should you use Modernizr or @supports? The answer is definitively "it depends". As with all web projects, only you can decide which is the best way.
webExplorations

A Modernizr Primer: Getting Started - 0 views

  •  
    Make your CSS3 pages backwards compatible with this JavaScript addon.
1 - 3 of 3
Showing 20 items per page