Skip to content

Instantly share code, notes, and snippets.

View ridgehkr's full-sized avatar

Caleb Pierce ridgehkr

View GitHub Profile
@ridgehkr
ridgehkr / radial-dropshadow.scss
Created September 6, 2013 14:36
CSS3 radial dropshadow (requires compass)
// drop-shadow for bottom of element
.bottom-drop-shadow {
position:relative;
background: #fff;
&:after {
content:"";
position:absolute;
z-index:-1;
bottom: 0;
width: 90%;
@ridgehkr
ridgehkr / compass_animation.scss
Created December 2, 2013 15:46
Compass mixins for generating CSS animations and keyframes
/*
* Compass doesn't have an animation mixin either. Here's one:
*
* Example usage:
* @include animation(10s, 5s, changecolour)
*/
@mixin animation($delay, $duration, $animation) {
@each $i in webkit, moz, o {
-#{$i}-animation-delay: $delay;
@ridgehkr
ridgehkr / placeholder-image.jade
Created March 27, 2014 17:49
Image placeholder mixin for Jade using the placehold.it image service
//- Generate a placeholder image from placehold.it
//- ----------------------------------
//- Parameters:
//- width: image width in pixels
//- height: image height in pixels
//- text (optional): text inside image
//- ----------------------------------
//- Usage:
//- +image(200, 120, 'Example')
//- ----------------------------------
@ridgehkr
ridgehkr / breakpoints.coffee
Last active August 29, 2015 14:01
Enquire.js w/ Foundation breakpoint classes
# Breakpoint class
# provides a way to manage and access breakpoint values for use in media queries
# read in more detail about this at https://medium.com/@caleb.pierce/coffeescript-for-responsive-websites-3398abd5e2bd
class Breakpoint
constructor: (@lower_bound, @upper_bound = "") ->
@screen = "only screen"
# returns a min-width style media query breakpoint
up: ->
@ridgehkr
ridgehkr / .bowerrc
Last active August 29, 2015 14:04
Starter Gulp Project (compiles Sass, CoffeeScript and JavaScript, Jade)
{
"directory": "bower_components"
}
@ridgehkr
ridgehkr / layers.scss
Created October 4, 2016 19:57
A way of managing z-index values to keep them from getting out of control
// Define a map of z-index layers. Utilized by layer()
$layers: (
foreground: 1,
local-hero: 2,
local-superhero: 3,
global-hero: 4,
global-superhero: 5,
);
/*