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
@import "compass/reset"; | |
@import "compass/utilities/sprites"; | |
@import "compass/css3/background-size"; | |
$icons-spacing: 5px; | |
$sprites : sprite-map("icons/*.png"); | |
@mixin retina-sprite($name) { | |
$name : $name; | |
background-image: sprite-url($sprites); |
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 i = 500000, ar = [], startTime, duration, output = {}; | |
while(i--) { | |
ar.push(i); | |
} | |
// jQuery | |
startTime = new Date().getTime(); | |
$.each(ar, function(index, item) { | |
// |
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
SrcSetSimplePolyfill = | |
init : () -> | |
img = new Image() | |
if 'srcset' of img is no and (window.devicePixelRatio || 1) > 1 | |
images = document.querySelectorAll('img'); | |
for image in images | |
@swapImagSrc image | |
swapImagSrc : (image) -> |
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
# SimpleTextEditor by Jørn Kinderås 2014 | |
# A simple demonstration of using Content Editable | |
SimpleTextEditor = | |
init: () -> | |
# Grab the main content holder | |
@contentHolder = document.querySelector '#editbox' | |
if not @contentHolder | |
throw new Error 'The editbox element has not been defined' |