Skip to content

Instantly share code, notes, and snippets.

@AaronLayton
AaronLayton / SimpleStore.js
Created October 22, 2015 12:42 — forked from ksafranski/SimpleStore.js
Simple localStorage function with Cookie fallback for older browsers.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
@AaronLayton
AaronLayton / cascade.scss
Last active September 17, 2015 13:07 — forked from cscottmills/cascade.scss
An SCSS mixin to sequence the transitions of a known number of elements
// Cascade
// $count accepts any whole number > 1
// $delay & $duration accept values in seconds
// NB you'll need to handle vendor prefixes yourself
// --------------------------
@mixin cascade($count, $property, $delay: 0s, $duration: 0.2s, $timing: ease) {
transition-property: $property;
transition-timing-function: $timing;
@for $i from 1 through $count {
&:nth-child(#{$i}) {
@AaronLayton
AaronLayton / countCSSRules.js
Last active August 29, 2015 14:26 — forked from psebborn/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {