Skip to content

Instantly share code, notes, and snippets.

.container {
width: 950px;
margin: 0 auto;
overflow: hidden;
display: inline-block;
}
.container {
display: block;
}
body.standard #footer,
body.standard #header,
body.standard #sidebar,
body.standard #content,
body.standard #ads {
float: left;
margin-left: 10px;
margin-right: 10px;
}
require "rubygems"
require "base64"
require "haml"
require "chunky_png"
module Sass::Script::Functions
def rgbapng(color)
chunky_color = ChunkyPNG::Color.rgba(color.red, color.green, color.blue, (color.alpha * 100 * 2.55).round)
image = ChunkyPNG::Image.new(1,1, chunky_color)
module Sass::Script::Functions
def user_color
color_values = options[:custom][:user].color.
scan(/^#?(..?)(..?)(..?)$/).first.
map {|num| num.ljust(2, num).to_i(16)}
Sass::Script::Color.new(color_values)
end
end
@chriseppstein
chriseppstein / 1_vendor_modules.rake
Created November 6, 2010 19:13
This gist is some helper functions and a rake task that allows you to quickly, safely , and easily vendor modules into your gems.
require 'fileutils'
def subsume_modules(*vendor_modules)
options = vendor_modules.pop
options[:modules] = vendor_modules + Array(options[:additional_modules])
options[:module_names] = options[:modules].map{|m| m.capitalize.gsub(/_[a-z]/){|s| s[-1..-1].upcase}}
vendor_modules.each do |vendor_module|
copy_module vendor_module, options
subsume_module vendor_module, options
end

1.0 TODO

Antares v0.11

The focus on this release is to get the compass stylesheet libraries and docs as close to final for 1.0 as possible.

  1. Upgrade to Blueprint 1.0
  2. DONE Upgrade stylesheets
@chriseppstein
chriseppstein / pending_blog_posts.markdown
Created March 30, 2011 22:27
A list of blog posts that I should write.
  • Mini state machines for page state with sass/jquery and html or body classes.
  • double-layer color constants: layer one: color names ($olive-green), layer two: common uses of colors ($link-color).
@chriseppstein
chriseppstein / dry_inner_content_using_capture.haml
Created May 23, 2011 19:07
This gist shows some approaches for using haml without repeating inner content
- content_for(:inner_content) do
= render :partial => "inner_content"
- if some_condition
%outertag1= yield :inner_content
- else
%outertag2= yield :inner_content
@chriseppstein
chriseppstein / factors.scss
Created August 5, 2011 21:39
Generate the factors of a number.
// Generate the factors of $n
// factors(24) #=> 1 2 3 4 6 8 12 24
@function factors($n) {
$factors: ();
@for $i from 1 through $n {
@if $n % $i == 0 {
$factors: append($factors, $i)
}
}
@return $factors;
@chriseppstein
chriseppstein / 0_silent_selector_grid.scss
Created January 4, 2012 22:08
This gist describes a new feature we're experimenting with for Sass 3.2: placeholder selectors. They do not get generated into your output, but they can be used like a class and extended like one.
$gutter: 10px;
$grid-unit: 60px;
%clearfix {
*zoom: 1;
&:after {
content: "\0020";
display: block;
height: 0;
clear: both;