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
yepnope [ | |
{ | |
# if IE, we need jQuery. Otherwise, Zepto will do just fine | |
test: '__proto__' of {} | |
yep: '//cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js' | |
nope: '//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js' | |
complete: -> | |
# use local jQuery fallback if neither Zepto nor jQuery loaded | |
!Zepto? and !window.jQuery? and yepnope('js/libs/jquery-1.9.1.min.js') | |
} |
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
<!DOCTYPE html> | |
<html lang='en' class='no-js'> | |
<head> | |
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'> | |
<!-- title, other meta, style, and script tags follow here --> | |
<!-- if you need detection for >= IE10, use my script here: https://gist.github.com/ridgehkr/5985810 --> | |
</head> | |
<!--[if IE 7]> <body class="ie7 lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <body class="ie8 lt-ie9"> <![endif]--> |
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
body { | |
-webkit-font-smoothing: antialiased; | |
text-rendering: optimizeLegibility; | |
/* | |
if text looks weak, use this as well: | |
-webkit-text-stroke: 0.35px; | |
*/ | |
} |
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
((doc)-> | |
addEvent = 'addEventListener' | |
type = 'gesturestart' | |
qsa = 'querySelectorAll' | |
scales = [1, 1] | |
meta = if qsa of doc then doc[qsa]('meta[name=viewport]') else [] | |
fix = -> | |
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1] | |
doc.removeEventListener(type, fix, true) |
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
/* Make sure this is last - helps correct for an orientation scale bug in iOS */ | |
@media screen and (orientation:landscape) and (device-width:320px) and (device-height: 480px) { | |
body { | |
width: 480px; | |
} | |
} |
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
.video-embed { | |
position: relative; | |
padding-bottom: 56.25%; // a 16x9 video's height is 56.25% of its width | |
height: 0; | |
object, embed, iframe { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; |
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
// container for evenly-spaced grid items | |
.l-spaced-grid { | |
text-align: justify; | |
font-size: 0; | |
&:after { | |
content: ''; | |
display: inline-block; | |
width: 100%; | |
} | |
} |
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
test_version = 10 # which version of IE to test for | |
isIE10 = document.documentMode? and document.documentMode == test_version | |
if isIE10 then document.documentElement.className += ' ie10' |
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
<!-- replace XXXXXX with the Project Key BugHerd gives you in their version of this script --> | |
<script>window._bugHerd||document.write('<script src="//www.bugherd.com/sidebarv2.js?apikey=XXXXXX"><\/script>')</script> |
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 isIE8, test_version; | |
test_version = 8; | |
isIE8 = (document.documentMode != null) && document.documentMode === test_version; | |
if (isIE8) { | |
return document.documentElement.className += ' ie8'; | |
} |
OlderNewer