Skip to content

Instantly share code, notes, and snippets.

@albybarber
albybarber / scss step animation mixin
Created December 15, 2015 18:38
scss step animation mixin
// This mixin takes the pain out of CSS step functions and has a non CSS3 fallback
//
// EXAMPLE:
// @include css-step-animation(ofo-welcome, 60, 'pages/one_funnel_onboarding/welcome.png', 12000px);
@mixin css-step-animation($name, $frames, $sprite-url, $sprite-length, $speed: 2s, $iteration-count: 1, $direction: normal, $fill-mode: forwards) {
$frame-width: $sprite-length / $frames;
background-image: image-url($sprite-url);
background-position: (-$sprite-length + $frame-width) 0;
@albybarber
albybarber / tada.css
Created August 28, 2013 10:16
CSS effect
@-webkit-keyframes tada{
0%{-webkit-transform:scale(1);}
10%,20%{-webkit-transform:scale(0.9) rotate(-3deg);}
30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);}
40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);}
100%{-webkit-transform:scale(1) rotate(0);}
}
@-moz-keyframes tada{
0%{-moz-transform:scale(1);}
@albybarber
albybarber / flipreversestickynavthatollywants.js
Last active December 10, 2015 13:58
jQuery.sticky() is a jQuery plugin that adds bar at the bottom of the users screen with the pages primary actions if they are not within the users viewport. e.g. At the bottom of the screen and need to be scrolled to view.
/* ========================================================
* jQuery.sticky();
* flipreversestickynavthatollywants 1.0
* https://vendadocs.onconfluence.com/x/2ItZAw
* Author: Alby Barber
* ========================================================
* Copyright 2012 Venda
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.