You can parse through the PHP variable $_SERVER['HTTP_USER_AGENT'] to detect the browser and OS, and echo browser / OS styles based on your findings. Thus, the corresponding styles are served even if the user does not have enough JavaScript needed to sniff the browser on the client side.
(Of course, viewers swapping their user agents may trick your system into using the wrong CSS, but who cares? It's their user experience, they need to know what they get.)
source share