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

Modernizr.borderradius is TRUE on device whitout support css border-radius

Modernizr.borderradius is TRUE on device whitout support css border-radius

Problem

I have a div element with css border-radius. My Android 2.2.1 Device with default browser (webkit/533.1) dosn't support border-radius, so i try use modernizr to detect this feature. Problem is that modernizr return true thought border-radius dosn't work. What can I do now? How can I detect it?

Demo on jsfiddle http://jsfiddle.net/7NvLM/

Problem courtesy of: Honzík

Solution

According to CanIUse, border-radius is supported by the Android 2.2 browser. 2.1 requires a prefix but is also supported. Therefore, Modernizr is reporting correctly.

However CanIUse also notes that Android 2.3 (and presumably earlier) does not support percentage values for the property. That'll be why it's not working for you.

I guess Modernizr is looking at basic feature support (which it has). You may need to write your own more specific test for this particular case.

Solution courtesy of: Spudley

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

Modernizr.borderradius is TRUE on device whitout support css border-radius

×

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

Get updates delivered right to your inbox!

Thank you for your subscription

×