Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is okay to implement Modernizr with Twitter Bootstrap?

Is it OK to implement Modernizr with Twitter Bootstrap?

I'm currently using Bootstrap with Google's html5shiv and I wanted to know if I can use Modernizr instead or is it overkill just to get HTML5 elements activated for older IE browsers?

Thanks in advance

like image 404
Wasabi Developer Avatar asked Jun 26 '12 14:06

Wasabi Developer


People also ask

Where do I put Modernizr?

The reason we recommend placing Modernizr in the head is two-fold: the HTML5 Shiv (that enables HTML5 elements in IE) must execute before the <body> , and if you're using any of the CSS classes that Modernizr adds, you'll want to prevent a FOUC.

How you can use Modernizr in HTML5?

Modernizr provides an easy way to detect any new feature so that you can take corresponding action. For example, if a browser does not support video feature then you would like to display a simple page.

What is Modernizr JS used for?

Modernizr is a JavaScript library that detects which HTML5 and CSS3 features your visitor's browser supports. In detecting feature support, it allows developers to test for some of the new technologies and then provide fallbacks for browsers that do not support them.

Which language has library function Modernizr?

What is Modernizr? Modernizr is a small piece of JavaScript code that automatically detects the availability of next-generation web technologies in your user's browsers.


1 Answers

Modernizr is a test suite that adds feature detection via classes applied to the body tag. It includes HTML5Shi(v|m) to add older browser compatibility. You don't need Modernizr just to style new tags in older browsers.

That said, it is OK to include Modernizr with Twitter Bootstrap. You can even get an auto-generated H5BP template with Bootstrap and Modernizr included at Initializr.

like image 171
Mathletics Avatar answered Sep 29 '22 18:09

Mathletics