Skip to content

Instantly share code, notes, and snippets.

@ideefixe
Created January 29, 2013 23:52
Show Gist options
  • Save ideefixe/4669174 to your computer and use it in GitHub Desktop.
Save ideefixe/4669174 to your computer and use it in GitHub Desktop.
Susy Sub Pixel Rendering Fix for Safari
if (jQuery.browser.safari) {
var width = $(window)
.width();
if (width < 671) {
$('.people_image')
.css('width', '32.5%');
} else if (width >= 1000) {
$('.people_image')
.css('width', '15.3%');
} else if (width > 671 && width <= 999) {
$('.people_image')
.css('width', '23.125%');
}
$(window)
.resize(function() {
var width = $(window)
.width();
if (width < 671) {
$('.people_image')
.css('width', '32.5%');
} else if (width >= 1000) {
$('.people_image')
.css('width', '15.3%');
} else if (width > 671 && width <= 999) {
$('.people_image')
.css('width', '23.125%');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment