This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html[data-useragent*='iPhone'] h1 { | |
color:blue; | |
} | |
html[data-platform='iPad'] h1 { | |
color:red; | |
} | |
/* See https://gist.github.com/2140799 for JS */ | |
/* Thanks, Rogie! http://rog.ie/post/9089341529/html5boilerplatejs */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var htmlAttr = document.documentElement; | |
htmlAttr.setAttribute('data-useragent', navigator.userAgent); | |
htmlAttr.setAttribute('data-platform', navigator.platform); | |
// See https://gist.github.com/2140827 for CSS | |
// Thanks, Rogie! http://rog.ie/post/9089341529/html5boilerplatejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.hide-text { | |
overflow: hidden; | |
text-indent: 100%; | |
white-space: nowrap; | |
} | |
/* See Zeldman: http://bit.ly/Aazp14 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (max-width:480px) and (orientation:landscape) { | |
/* Do stuff for iPhone in landscape */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var htmlAttr = document.documentElement; | |
// Check if app mode is enabled, but not being used | |
if (("standalone" in window.navigator) && !window.navigator.standalone) { | |
$(htmlAttr).addClass('ios-app-mode-disabled'); | |
} | |
// Thanks, Ben! http://bit.ly/95VUOP |
NewerOlder