Skip to content

Instantly share code, notes, and snippets.

@jackie
jackie / SassMeister-input.scss
Created January 14, 2014 19:01
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$my_var: red;
html {
background: $my-var;
}
@jackie
jackie / gradient-stripe.scss
Created September 29, 2013 02:14
Recursively generates a striped gradient.
$colors: #b00b00 #bada55 #de1e7e #f0feaf #ac1d1c #e1e100 #facade;
$stops: ();
@function gradient($i: 0) {
@if $i == length($colors) {
@return $stops;
}
$i: $i + 1;
$new-stops: nth($colors, $i) percentage(($i - 1)/length($colors)), nth($colors, $i) percentage($i/length($colors));
$stops: join( $stops, $new-stops, comma );
@jackie
jackie / breakpoints.json
Last active December 19, 2015 15:28
Sass Script function to get breakpoint values from a JSON file.
{
"phone" : "all and (max-width: 603px)",
"desktop": "all and (min-width: 1025px)",
"tablet" : "all and (min-width: 604px) and (max-width: 1024px)"
}
@jackie
jackie / index.html
Created February 18, 2013 23:52
A CodePen by Jackie Balzer.
<h1>Coolest text on the internet</h1>
@jackie
jackie / index.html
Created February 18, 2013 23:52
A CodePen by Jackie Balzer.
<h1>Coolest text on the internet</h1>
@jackie
jackie / gist:3975932
Created October 29, 2012 19:26
lazyload
Network.View.Project.Lazyload = $.Core.View.Entity.extend({
}, // proto
{
init : function( lazyload ) {
var $images = $('#project-modules img'),
$lazy_images = $images.filter('.lazy-load');
@jackie
jackie / gist:3975454
Created October 29, 2012 18:20
new lazyload modifications
Network.View.Project.Lazyload = $.Core.View.Entity.extend({
}, // proto
{
init : function( lazyload ) {
var $images = $("#project-modules img.lazy-load"),
images_loaded = 0;
@jackie
jackie / config.rb
Created October 17, 2012 16:23
Remove the cachebuster from a Compass-generated sprite
# config.rb
on_sprite_saved do |filename|
if File.exists?(filename)
FileUtils.mv filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, '.png').gsub('images/../images/', '')
end
end
@jackie
jackie / retina
Created October 17, 2012 15:51
Compass retina spriting
$footer-2x-layout: horizontal;
$footer-2x-sprite-dimensions: true;
$footer-layout: horizontal;
$footer-sprite-dimensions: true;
@import "compass/utilities/sprites/base";
//** Footer ****************************************/
@import "../images/footer/*.png";
@jackie
jackie / retina.scss
Created October 15, 2012 22:36 — forked from brianmcallister/retina.scss
Retina background image.
/*
Set a background image at 1x and 2x.
https://gist.github.com/3895807
@param {String} $name Image name.
@param {String} $ext File extension, e.g.: '.png'.
*/
@mixin retina-bg($name, $ext) {
@include squish-text;
$image: '#{$name}#{$ext}';