Skip to content

Instantly share code, notes, and snippets.

@mixin png-image-set($image){
@include image-set($image, "png");
}
@mixin jpg-image-set($image){
@include image-set($image, "jpg");
}
@mixin gif-image-set($image){
@include image-set($image, "gif");
}
@mixin image-set($name,$extension){
var isiPhone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i));
var getWindowHeight = function(){
// this was the most reliable way I could find of getting the actual viewport height without the status, address or button bar.
return isiPhone ? window.screen.availHeight - (window.navigator.standalone ? 0 : 44) : $(window).height();
}
//Lose the address bar