Skip to content

Instantly share code, notes, and snippets.

@import compass/reset.sass
*:focus
outline: #ccc dotted medium
!base_font_size = 12px
!base_rhythm_unit= 1.5
!h2_font_size = 14px
!h2_font_size = 24px
!base_rhythm_unit = 18px
@if (!h2_font_size > !base_rhythm_unit)
line-height = ceil(!h2_font_size/!base_rhythm_unit)*!base_rhythm_unit
@else
line-height = !base_rhythm_unit
//** Vertical Rhythm **//
// By Chris Eppstein, with adjustments by Eric Meyer
// The IE font ratio is a fact of life. Deal with it.
!ie_font_ratio = 16px / 100%
// The base line height is the basic unit of line hightness.
!base_line_height ||= 18px
// Image Replacement Mixin
// Uses Compass's image_url(), image_width() & image_height() function
=image-replacement(!imageurl)
background-image = image_url(!imageurl)
width = image_width(!imageurl)
height = image_height(!imageurl)
display: block
overflow: hidden
text-indent: -1000px
// CSS declared in for HTML5 elements http://www.whatwg.org/specs/web-apps/current-work/#bindings
button,
input,
meter, progress,
select,
textarea,
keygen,
{ display: inline-block; }
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Detect Credit Card Type</title>
</head>
<body>
@nimbupani
nimbupani / generategrid.scss
Created January 3, 2011 03:34
Generate a grid with CSS gradients
@import "compass";
@mixin generategrid(
$vertical: 18px,
$verticalcolor: rgb(0, 0, 0),
$horizontal: 30px,
$horizontalmargin: 10px,
$horizontalcolor: rgb(0, 43, 255)) {
@include linear-gradient(color-stops($verticalcolor 5%, rgba(0, 0, 0, 0) 5%, rgba(0, 0, 0, 0) 100%));
@nimbupani
nimbupani / classnames.txt
Created February 22, 2011 12:15
Web Structure Three-Letter Acronyms
The following is a proposal for a standardized three-letter acronyms classnames system used for in web content structures.
doc, seg, sec
Document Elemental
------------------
doc = document
dpt = document part
dhd = document header
dft = document footer
#!/bin/bash
#
# Copyright 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
# Dual licensed under the MIT and GPL licenses.
#
# Automatically clone single or multiple repos into a folder,
# great for setting up a git projects folder.
#
# Install: curl http://t.no.de/gist/github.sh | sh
#
@nimbupani
nimbupani / draw-svg.js
Created June 7, 2011 20:33 — forked from johan/draw-svg.js
Draw an SVG bit by bit
var steps = 0 // steps drawn on the current element, so far
, info = document.getElementById('next_step')
, svgs = [].slice.call(document.getElementsByTagName('svg'))
, svg, walker, current;
function lexSVGPath(d) {
function command(seg) {
var cmd = seg.match(/[a-z]/i), arg, cnt;
if (cmd) {
cmd = cmd[0]; // which subcommand