Skip to content

Instantly share code, notes, and snippets.

@codingdesigner
codingdesigner / index.html
Created November 2, 2012 19:43
A CodePen by Mason Wendell. Simulate Book Spines - Sass mixin to simulate a book spine using css bottom borders and pseudo elements
<nav class="main-menu">
<ul>
<li>
<a href="">Book Store</a>
</li>
<li>
<a href="">Readings</a>
</li>
<li>
<a href="">Book Services</a>
@codingdesigner
codingdesigner / _breakpoint-version.scss
Created October 25, 2012 14:37 — forked from kerns/_respond-to-ccmq.md
Conditionally Conjoined Media Queries for Sass (just a proposal, and quite possibly a bad one)
// path to local mixin
@import "../../stylesheets/breakpoint";
// @import "breakpoint";
/* 1. Using Breakpoint to do exactly what you propose */
$breakpoint-default-media: 'only screen';
$break-small: 320px;
$break-medium: 580px;
$break-large: 1234px;
section {
width: 696px;
}
.view-store table {border-bottom: 1px solid rgb(211, 212, 210);margin-bottom: 24px;padding-bottom: 23px;clear: left;display: block;
}
table {width: 100%;
}
div {
height: 300px;
width: 300px;
float: left;
margin-right: 1em;
}
.one {
background-image: linear-gradient(-85deg,
#bada55 25%, #444 25%);
}
@codingdesigner
codingdesigner / breakpoint.sass
Created May 21, 2012 21:09
SURVIVAL KIT - BREAKPOINT
////////////////////////////
// SURVIVAL KIT - BREAKPOINT
// breakpoint($breakpoint, $media: 'screen')
////////////////////////////
$breakpoint-default-feature: min-width !default
// create $breakpoint variables like so
// assume $breakpoint-default-feature if only a number
$breakpoint1: 500px
@codingdesigner
codingdesigner / read me.md
Created April 18, 2012 16:05
Sass and Compass demo from April 17, 2012 NYC Sass meetup

Based on Survival Kit

I gave a demo last night at the first NYC Sass meetup that went over some of the key features of Sass and Compass. If you're going thru this bear in mind that the HTML is definitely overkill for this purpose, and that I'm not including any of the images in this gist. But you should get the idea.

@canarymason

html{
height: 100%;
}
body {
background-color: white;
background-image: -webkit-repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 25px, rgba(0, 0, 0, 0.5) 25px, rgba(0, 0, 0, 0.5) 50px);
background-image: -moz-repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 25px, rgba(0, 0, 0, 0.5) 25px, rgba(0, 0, 0, 0.5) 50px);
background-image: -o-repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 25px, rgba(0, 0, 0, 0.5) 25px, rgba(0, 0, 0, 0.5) 50px);
background-image: -ms-repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 25px, rgba(0, 0, 0, 0.5) 25px, rgba(0, 0, 0, 0.5) 50px);
@codingdesigner
codingdesigner / dabblet.css
Created January 5, 2012 15:45
Sassy Text Shadows Test
/**
* Sassy Text Shadows Test
* fancy shadows generated by Sass
* see https://github.com/canarymason/sassytextshadow for more information
* https://rubygems.org/gems/sassy-text-shadow to install
*/
body {
text-align: center;
font-family: helvetica, georgia;
@codingdesigner
codingdesigner / gist:1259587
Created October 3, 2011 16:53
convert px to em in sass
// convert px to em in sass.
// $target-px: the value you want to convert
// $context: the current pixel value of 1em
@function calc-em($target-px, $context) {
@return ($target-px / $context) * 1em;
}
@codingdesigner
codingdesigner / gist:1128650
Created August 5, 2011 22:13
generates fibonnaci sequence up to a number
// generate fibonacci numbers
// fib(50) #=> 1 1 2 3 5 8 13 21 34
@function fib($n)
$fibonacci: ()
$i: 0
$j: 1
@while ($i + $j) < $n
$fibonacci: append($fibonacci, $i + $j)
$k: $j
$j: $i