Skip to content

Instantly share code, notes, and snippets.

View micahgodbolt's full-sized avatar

Micah Godbolt micahgodbolt

View GitHub Profile
@micahgodbolt
micahgodbolt / PDXSass_0214.scss
Last active August 29, 2015 13:56
Code from PDX Sass demo given February 2014.
///////////////////////////////////
/// Major Features of Sass 3.3
///////////////////////////////////
// @at-root
.widget {
@at-root .body {
background: red;
@micahgodbolt
micahgodbolt / SassMeister-input.scss
Created February 18, 2014 00:11
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.4)
// Compass (v1.0.0.alpha.18)
// ----
$navigation: (
background: blue,
color: green,
line-height: 1.3,
is-expanded: (
@micahgodbolt
micahgodbolt / SassMeister-input.scss
Created February 18, 2014 17:09
Multi-level Map Mixin
// ----
// Sass (v3.3.0.rc.4)
// Compass (v1.0.0.alpha.18)
// ----
$navigation: (
background: blue,
color: green,
line-height: 1.3,
is-expanded: (
@micahgodbolt
micahgodbolt / memoization.scss
Last active August 29, 2015 13:57
Memoization Example
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
//// Fibonacci Function
@function fibonacci($n) {
$fib: 0 1;
@for $i from 1 through nth($n,1) {
$new: nth($fib, length($fib)) + nth($fib, length($fib) - 1);
@micahgodbolt
micahgodbolt / SassMeister-input.scss
Last active August 29, 2015 14:01
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// Using maps as the map key allows you to
// pull the proper value based on multiple inputs/choices
// this helps to avoid nested if statements (if i win, and you lose)
$test: (
@micahgodbolt
micahgodbolt / SassMeister-input.scss
Created May 29, 2014 21:01
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
@mixin thing($ratio) {
foo: $ratio;
bar: nth($ratio, 1);
baz: nth($ratio, 3);
}
@micahgodbolt
micahgodbolt / SassMeister-input-HTML.html
Created June 18, 2014 14:41
Generated by SassMeister.com.
<div></div>
@micahgodbolt
micahgodbolt / SassMeister-input-HTML.html
Created June 18, 2014 15:42
Generated by SassMeister.com.
<div></div>
/* Welcome to Compass.
* In this file you should write your main styles. (or centralize your imports)
* Import this file using the following HTML or equivalent:
* <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> */
@import "susy";
@mixin span(
$span
) {
@micahgodbolt
micahgodbolt / SassMeister-input-HTML.html
Created July 2, 2014 19:41
Generated by SassMeister.com.
<div class="extends">
<div><span></span></div>
<div><span></span></div>
<div><span></span></div>
<div><span></span></div>
<div><span></span></div>
<div><span></span></div>
<div><span></span></div>
<div><span></span></div>
<div><span></span></div>