CSS border-radius in Android 4.2.2

Hi, is anyone having trouble implementing border-radius to a button or any element on Android 4.2.2?

<button class="button icon ion-gear-a"></button>

For the button above, the CSS rules:

    border-radius: 5px;
   -webkit-border-radius: 5px;

It works fine on browser (Duh!) and on 4.4.2 (Because of chromium web view). But silly thing breaks on

Any work around for this?

Hmm, could I be getting overwritten by some other css?


CanIUse says that border-radius should work fine on 4.2

Yeah! I did see it.

The problem was, background-color “leaking” outside of a border when border-radius is present.

So, I used

/* Prevent background color leak outs */ -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box;

Now it works just fine.

And that is the solution there.

1 Like