HTML and CSS Reference
In-Depth Information
Finding and using polyfills
Most of HTML5 and CSS3 features have differing levels of support in different
browsers, hence, either use JavaScript code to mimic these features in browsers that
do not support them or provide an altering view. Such snippets of code are called
polyfills .
I help maintain which is an opinionated list of polyfills for some
popular HTML5 and CSS3 features.
Beware of the performance penalty of using a lot of polyfills on a browser that does
not support a lot of features.
When you do use your polyfills, make sure you use Modernizr's load function like we
did for the audio polyfill for Sun and Sand Music Festival website in Chapter 4 , Ad-
ding Interactivity and Completing Your Site . This would prevent unnecessary loading
of polyfills on browsers that support the features you want to use.
A comprehensive list of all kinds of polyfills is available on the Modernizr Wiki at git- .
Search WWH ::

Custom Search