Target safari css, but not chrome
41,888
Found somewhere else here. worked fine for me
@media screen and (-webkit-min-device-pixel-ratio:0) {
/* Safari and Chrome */
.myClass {
color:red;
}
/* Safari only override */
::i-block-chrome,.myClass {
color:blue;
}
}
Author by
user3353748
Updated on July 09, 2022Comments
-
user3353748 almost 2 years
Ran into a problem, where chrome and safari display margin differently. But both of them are webkit, so can't really use a prefix. Is there any solution, or hack that could help with it?
-
sohaiby over 8 yearsMicrosoft Edge also support some features of
-webkit
... your answer will target MS Edge as well -
cptstarling about 8 yearsNot working for me, but this does: stackoverflow.com/questions/16348489/…