This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
/* Seen in jQuery Mobile, Twitter's Bootstrap, etc. */ | |
/* Requires inline-block or block for proper styling */ | |
.text-overflow { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} |
This file contains hidden or 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
// Border-box sizing | |
.box-sizing { | |
-moz-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} |
This file contains hidden or 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
// BrandColors | |
// Curated by: Galen Gidman | |
// http://galengidman.com/brandcolors/ | |
// LESS CSS Variables | |
// Using @bc'BrandColor' as naming convention | |
// LESS file by @ackernaut | |
@bcAboutMeBlue: #00405d; | |
@bcAboutMeYellow: #ffcc33; |
This file contains hidden or 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
// File: detection.js | |
(function($){ | |
var htmlAttr = document.documentElement; | |
var ua = navigator.userAgent.toLowerCase(); | |
// Global variables | |
isiPhone = ua.indexOf("iphone") > -1; | |
isiPad = ua.indexOf("ipad") > -1; |
This file contains hidden or 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
// iOS Device Dimensions | |
@iPadLandHeight: 768px; | |
@iPadPortHeight: 1024px; | |
@iPadLandWidth: 1024px; | |
@iPadPortWidth: 768px; | |
@iPhoneLandHeight: 320px; // 640 / 2 | |
@iPhonePortHeight: 480px; // 960 / 2 |
OlderNewer