Skip to content

Instantly share code, notes, and snippets.

View theprojectsomething's full-sized avatar

theprojectsomething

View GitHub Profile
@theprojectsomething
theprojectsomething / MediaQuery.scss
Last active August 29, 2015 14:03
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@function calculate-ranges($breaks) {
$ranges: ();
$length: length($breaks);
@for $i from 1 through $length - 1 {
@theprojectsomething
theprojectsomething / SassMeister-input.scss
Created July 2, 2014 08:30
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// ----
$a: 'body[data-type]';
$b: 'body[data-type]',
'body[data-type=none]';
@mixin parent ($vars) {
@theprojectsomething
theprojectsomething / Timer.js
Created March 17, 2014 07:26
Timer - a simple JS timing implementation utilising requestAnimationFrame.
/*
Timer
- utilises animation frames (with a fallback to setTimeout when using the polyfill, below)
- returns remaining (or running) time
- pass a callback [fn], with an optional duration [ms] and autotart [bool], to the constructor or 'init' method
eg. new Timer(foo, 1000) *or* (new Timer()).init(foo, 0, true)
- for uniform x-browser support combine with the requestAnimationFrame polyfill from Erik Möller, et. al.
[https://github.com/darius/requestAnimationFrame]
*/