Put custom CSS properties like -js-myprop: myval
().
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
// http://viljamis.com/blog/2013/prototyping-responsive-typography/?utm_source=Responsive+Design+Weekly&utm_campaign=76e7785581-Responsive_Design_Weekly_046&utm_medium=email | |
$browser-context: 16; // Default | |
@function em($pixels, $context: $browser-context) { | |
@return #{$pixels/$context}em | |
} |
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
function sanitize(obj) { | |
if ($.isArray(obj)) { | |
for (var i = 0, len = obj.length; i < len; i++) { | |
obj[i] = sanitize(obj[i]); | |
} | |
} | |
else { | |
for (var p in obj) { | |
if (!obj.hasOwnProperty(p)) continue; | |
if ('object' == typeof obj[p]) { |
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
// via http://twitter.com/izs/statuses/17744109574 | |
var foo = 1; | |
var bar = 2; | |
foo = [bar, bar = foo][0]; |
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
$('.elem').on(VirtualPointer.MOVE_EVENT, function(e) { | |
if (!e.isTrigger) return; | |
// handler code | |
}); |
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
$(document).ready(function() { | |
var prefix = "https://gist.github.com/"; | |
$('a[href^="' + prefix + '"]').each(function(i) { | |
var $anchor = $(this), | |
$el = $("<p></p>"); | |
$anchor.replaceWith($el); | |
writeCapture.html($el, '<script src="'+$anchor.text()+'"></scr' + 'ipt>'); | |
$anchor.remove(); | |
}); | |
}); |
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
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(d, u) { | |
var s = d.scripts[0], | |
i = u.length, g; |
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
git shortlog -s -n |
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
$mq-small: 32rem /* 320px */ !default; | |
$mq-normal: 40rem /* 400px */ !default; | |
$mq-large: 68rem /* 680px */ !default; | |
$mq-xlarge: 100rem /* 1000px */ !default; | |
$mq-xxlarge: 128rem /* 1280px */ !default; | |
// | |
// small size | |
// |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |