Skip to content

Instantly share code, notes, and snippets.

@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@grundprinzip
grundprinzip / blurify.js
Created June 26, 2013 15:18
Change Window Title on Blur
var n,t;
typeof document.hidden != "undefined" ?
(e = "hidden", n = "visibilitychange", t = "visibilityState") :
typeof document.mozHidden != "undefined" ?
(e = "mozHidden", n = "mozvisibilitychange", t = "mozVisibilityState") :
typeof document.msHidden != "undefined" ?
(e = "msHidden", n = "msvisibilitychange", t = "msVisibilityState") :
typeof document.webkitHidden != "undefined" &&
(e = "webkitHidden", n = "webkitvisibilitychange", t = "webkitVisibilityState"), t && $(document).on(n, function (e) {
var n = "Come back! We miss you!";