Skip to content

Instantly share code, notes, and snippets.

View micahgodbolt's full-sized avatar

Micah Godbolt micahgodbolt

View GitHub Profile
@micahgodbolt
micahgodbolt / gist:2936775
Created June 15, 2012 14:36
Proposed Susy syntax to create "The Fonmon" asymmetric grid layout
//Proposed Susy syntax to create "The Fonmon" asymmetric grid layout. http://gridsetapp.com/specs/fonmon.php?gridset=show
$total-columns: 5;
$column-width: 200px, 96px, 96px, 96px, 200px;
// could use relative units: 1, 1 would be 50/50%. 1, 2 would be 33/66%, 1, 1, 1 would be 33/33/33%
$columns: column padding, column padding, column padding, column padding, …; //suggested multi dimensional syntax
$gutter-width: 30px;
@micahgodbolt
micahgodbolt / gist:3188784
Created July 27, 2012 15:48
Sass: Image Replacement
= ir($image)
display: block
background: url(../img/#{$image})
height: image-height($image)
width: image-width($image)
border: 0
font: 0/0 a
text-shadow: none
color: transparent
background-color: transparent
@micahgodbolt
micahgodbolt / gist:4669283
Created January 30, 2013 00:05
my pac 12 config.rb
# Require any additional compass plugins here.
require 'zen-grids'
require 'compass-normalize'
require 'sass-globbing'
# Set this to the root of your project when deployed:
relative_assets = "true";
css_dir = "css"
sass_dir = "sass"
extensions_dir = "sass-extensions"
images_dir = "images"
@micahgodbolt
micahgodbolt / gist:4991146
Last active December 13, 2015 23:19
Partial specific variables using get-serve
# Block syntax
<%
if !defined? title
title = "Default Title"
end
%>
<h2><%= title %></h2>
<p>Blah blah blah blah</p>
$(document).ready(function() {
// Make tabs work
$('.tabs-wrapper .tab-option').hide();
$('.tabs-wrapper .tab-option:first').show();
$('.tabs-wrapper li:first').addClass('active');
$('.tabs-wrapper .tabs li a').click(function(){
$(this).parent().siblings().removeClass('active');
@micahgodbolt
micahgodbolt / respond-to.scss
Last active December 14, 2015 16:59
My respond-to mixin.
$small = 400px;
$medium = 800px;
$upto-medium = $medium, max-width;
@mixin respond-to($primary, $secondary:min-width) {
@if $secondary == max-width {
@media screen and (max-width: $primary - 1) { @content; }
}
@else if $secondary == min-width {
@media screen and (min-width: $primary) { @content; }
@micahgodbolt
micahgodbolt / gist:5339017
Last active July 4, 2018 17:03
mixin used to call font icons
%icon-font:before {
font-family: "fontcustom";
font-weight: normal;
font-style: normal;
text-decoration: inherit;
display: inline-block;
}
.icon-calendar:before { content: "\f100"; }
.icon-comment:before { content: "\f101"; }
@micahgodbolt
micahgodbolt / _respond-to.scss
Last active December 16, 2015 08:38
Respond-to Mixin with .ie8 fallback
@mixin respond-to($primary, $secondary:min-width) {
@if $secondary == max-width {
@media screen and (max-width: $primary - .001) { @content; }
}
@else if $secondary == min-width {
@media screen and (min-width: $primary) { @content; }
@if $primary == $large {
.ie8 &{
@content;
@micahgodbolt
micahgodbolt / SassMeister-input.scss
Created June 24, 2013 16:08
Another stab at Filament Group's Element Query challenge.
// ---
// Sass (v3.2.9)
// ---
@mixin respond-to($queries...) {
$length: length($queries);
@for $i from 1 through $length{
@if $i % 2 == 1 {
@media screen and (min-width: nth($queries, $i)) {
@micahgodbolt
micahgodbolt / sassbites5.scss
Created August 29, 2013 15:29
SassBites Episode #5
$animal: cat;
$tail: curl;
div {
@if $animal == 'cat' {
sound: meow;
}
@if $animal == 'dog' {
sound: woof;
}