I have observed that each browser displays box shadow blur radius a bit differently, so I want to ensure consistency across all browsers. However, since they use the unprefixed version, I need to provide different stylesheets for each browser. What is the most effective approach to achieve this?
For instance: Mozilla utilizes moz_style.css
, while Chrome uses chrome_style.css
I am currently using user agent detection for this purpose, but I have heard that it may not be the most reliable method:
<script>
if(BrowserDetect.browser=="Chrome") {
document.write('<link rel="stylesheet" href="css/chrome.css" type="text/css" media="all" />')
}
</script>