Andrew Colclough

Web Design & Dev., Liberty, Economics, Football

« Back to blog

Sass - Syntactically Awesome Stylesheets

Beauty

Sass does away with the unnecessary brackets and semicolons of CSS. Properties are nested beneath selectors, and each property gets its own line.

// Sass

h1
  height: 118px
  margin-top: 1em

.tagline
  font-size: 26px
  text-align: right
/* CSS */

h1 {
  height: 118px;
  margin-top: 1em;
}

.tagline {
  font-size: 26px;
  text-align: right;
}

This seems like an interesting idea. As a language, CSS certainly lacks many useful functions that are common to other coding languages. My only concern with Sass is that it adds an additional layer of complexity to the styling process - a process that has become second nature for me. If I can figure out a way to streamline Sass into the normal CSS workflow (code, browser refresh test, iterate) then I can see it becoming quite useful.

If I get some time to experiment with this - I will certainly post a review as well as a tutorial to help any developer get started.

HT: Nathan

Nov 21, 2009
nex3 said...
Check out Compass (http://compass-style.org) - it has a command-line tool that automatically compiles Sass to CSS when the Sass files are updated. That makes it much easier to use Sass outside of Ruby.