Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active April 28, 2020 20:42
Show Gist options
  • Save neilgee/1be1c9e732cc911a63547a89b5254822 to your computer and use it in GitHub Desktop.
Save neilgee/1be1c9e732cc911a63547a89b5254822 to your computer and use it in GitHub Desktop.
Target Safari Browsers
.safari-mac .site-container {
display: block;
}
(function($){
/* Adjustments for Safari on Mac */
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Mac') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
$('body').addClass('safari-mac'); // provide a class for the safari-mac specific css to filter with
}
})(jQuery);
//https://stackoverflow.com/questions/2838664/how-to-target-safari-for-mac-only/10137912
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment