Check if browser supports RGBA | Lea Verou

“When using CSS, we can just include both declarations, one using rgba, and one without it, as mentioned in my post on cross-browser RGBA backgrounds. When writing JavaScript however, it’s a waste of resources to do that (and requires more verbose code), since we can easily check whether the browser is RGBA-capable, almost as easily as we can check whether it suppports a given property. We can even follow the same technique to detect the support of other CSS3 values (for instance, multiple backgrounds support, HSLA support, etc).”

via Check whether the browser supports RGBA (and other CSS3 values) | Lea Verou.

 

Adam Merrifield

 

Leave a Reply