Update: Sass CSS Reset has been revised.

An associate turned me on to Hampton Catlin’s Haml and Sass — terse, structured representation of xhtml markup and css rules. Not bad work for a guy who used to work with a Canadian vampire! If you’re working with Rails, I highly recommend it. I am a markup snob who is sensitive to white space, and after my initial rash-like reaction to Haml, the itching went away and I grew to like it.

For those that have embraced Eric Meyer’s css reset work, here’s a version of css reset in Sass.

Sass CSS Reset

download

// reset.sass
// Generated 10/1/2007
// yong joseph bakos
// This is a sassified version of Eric Meyer's reset.css
// http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
//
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td
  :margin 0
  :padding 0
  :border 0
  :outline 0
  :font-weight inherit
  :font-style inherit
  :font-size 100%
  :font-family inherit
  :vertical-align baseline

*:focus
  :outline 0

body
  :line-height 1
  :color black
  :background white

ol, ul
  :list-style none

table
  :border-collapse separate
  :border-spacing 0

caption, th, td
  :text-align left
  :font-weight normal

blockquote:before, blockquote:after, q:before, q:after
  :content ""

blockquote, q
  :quotes "" ""

Posted Monday, October 1st, 2007 at 4:13 pm
Filed Under Category: Programming, Ruby on Rails, CSS
You can leave a response, or trackback from your own site.

3

Responses to “Sass CSS Reset”

fractious

This should be part of SASS - a nice little command you could call at the top of your stylessheet that would automatically inject this into your CSS.

Chris Eppstein

Compass is a Sass framework that provides a reset as well as ports of major css frameworks like blueprint and YUI including the ability to mix and match them.

http://github.com/chriseppstein/compass/wikis

Chris

Dan Kubb

+1 for Compass. I just started using on a Merb app and it was pretty easy to set up.

Leave a Reply