Share on Facebook Share on Twitter Email
Answers.com

Sass

 
Wikipedia: Sass (stylesheet language)
Sass
Sass Logo.gif
Developer(s) Nathan Weizenbaum, Chris Eppstein, Hampton Catlin
Stable release 2.2.0 / 2009-07-06; 4 months ago
Operating system Cross-platform
Type Template Engine
License MIT License
Website http://sass-lang.com/

Sass (Syntactically Awesome Stylesheets) is a module that is included in Haml. It is described as a meta-language on top of CSS, and is meant to abstract CSS code and create simpler stylesheet files.


Nested Rules

One of the key features of Sass is its nested rules, which make complicated nested selectors easy to read and write.

#header
  :background #FFFFFF

  .error
    :color #FF0000
  
  a
    :text-decoration none
    &:hover
      :text-decoration underline

Would compile to:

#header {
  background: #FFFFFF;
}
#header .error {
  color: #FF0000;
}
#header a {
  text-decoration: none
}
#header a:hover {
  text-decoration: underline
}

CSS variables

Sass adds constants and mixins to css. This makes it easy to keep and maintain consistent values through out a large set of styles. Constants allow you to set one value and use it through out the styles while mixins expand that to a block of style attributes.

!link_color = #00F

a
  :color = !link_color

Would compile to

a {
  color: #00F
}

External links


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 
Learn More
Sahs (family name)
Bluebeard's Castle (1981 Music Film)
sass

What is sass? Read answer...
Is zachary sass on crackk? Read answer...
When was Sass Jordan born? Read answer...

Help us answer these
What is sass in clinical research?
Where is a sass and bide stockist in cairns?
What does frank sass like?

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Sass (stylesheet language)" Read more

 

Mentioned in