Can conditional comments work for others besides IE?

I want to use a separate CSS sheet on my webpage for Chrome and Safari than the one used for all other types of borwser. Earlier I used conditional comments for IE, for example:

<!--[if !IE]><link rel="stylesheet" type="text/css" href="style.css"><!--<![endif]-->
<!--[if IE]><link rel="stylesheet" type="text/css" href="style2.css"><![endif]-->

but I want the above to work for Chrome and Safari. Is it possible?

0
source share
2 answers

Conditional comments only work in IE.

This is a creative way to solve this problem. I learned it from here

@media screen and (-webkit-min-device-pixel-ratio:0) {  
  /* CSS Statements that only apply on webkit-based browsers (Chrome, Safari, etc.) */
}
0
source

Mozilla also has a specific provider.

@media screen and (min--moz-device-pixel-ratio:0) {
   /* Firefox browser based CSS goes here */
}
0
source

All Articles