Ruby and Sass….help me?

So I read a few articles lately, and I’ve seen this stuff before, but now I am really interested. Anyone out there wanna comment on Ruby? The syntax seems easy enough to learn, and I have heard it can be used to create things very quickly. I have also heard by some IT people I know that though it can be quick to create, which is good for prototyping, but hard to change. I’m looking for the run down on why I would want to look at Ruby. And is Rails the same thing? Help coders!

I’m interested in it because of Sass and what you can do with CSS. Here are just some examples I’ve seen with what you can do with Sass (Syntactically Awesome Stylesheets).

Variables:

!blue = #3bbfce
 
.content_navigation
  border-color = !blue

And this looks just plain awesome:

.highlight {
  border: 1px #666666 solid;
}
.moreHighlight {
  @extend .highlight;
  background-color: #ff0000;
}

From what I’ve read, this means that anything with the style of moreHighlight also gets the styles of highlight. There are other things like Mixins and such that look bad ass as well.

What I’m curious about though, is it looks like it is compiled. Does this mean I have to do something every time I make a change to the file? Meaning re-compile it? Again, help me out!

Tags: , ,

2 Responses to “Ruby and Sass….help me?”

  1. First of all, you don’t need to know anything about Ruby to use Sass. You do need to have it installed, but that’s it; the Sass language and the Ruby language are completely separate. Sass can be controlled entirely from the command line.

    Second, Sass 3 (due to be released in a little under two weeks) is able to watch your Sass files and update the CSS whenever they change, meaning that you don’t have to worry about doing something for every change you make. For more details, see http://nex-3.com/posts/90-auto-compile-sass-files-with-sass-3 .

  2. jcDesigns says:

    Thanks Nathan, I will check out that link.

Leave a Reply