Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

-webkit-overflow-scrolling polyfill or feature detection

-webkit-overflow-scrolling polyfill or feature detection

Problem

-webkit-overflow-scrolling is new to iOS 5. I'm looking for a CSS Polyfill or a method rather than user agent reading for detecting if this feature is available. Modernizer don't detect this.

Problem courtesy of: Mohsen

Solution

Modernizr doesn't detect the property by default, but you can add your own test to it.

Just call this code anywhere:

Modernizr.addTest('overflowscrolling', function() {
    return Modernizr.testAllProps("overflowScrolling");
});

after the call, your body element will either have a overflowscrolling or a no-overflowscrolling class and you can check the support against Modernizr.overflowscrolling.

Solution courtesy of: fcurella

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

-webkit-overflow-scrolling polyfill or feature detection

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×