Use HTML5 and Advanced CSS Features Now

The website says it best:

Have you ever wanted to do if-statements in your CSS for the availability of cool features like border-radius? Well, with you can accomplish just that!

Modernizr is a small (7kb) JavaScript file that checks the user’s browser and determines which advanced features are supported, then appends classes to the body element like .borderradius or .no-borderradius. You can then target browsers with CSS like:
.borderradius h1{//styles you want these users to get...}
.no-borderradius h1{//and styles you want these users get...}

As an added bonus, Modernizr also adds HTML5 support similar to the IE Shiv!

Pretty cool stuff!

Happy Modernizing, and thanks for Dan “the Man” Mendelsohn for turning me on to this,
Atg

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.