Sass (stylesheet language)

From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search
File:Sass Logo.gif
Usual file extensions .sass
Appeared in 2007
Designed by Hampton Catlin
Developer Nathan Weizenbaum, Chris Eppstein
Stable release 2.2.0 (July 6, 2009; 417557270 ago)
Typing discipline dynamic
Major implementations Haml
Influenced by CSS, Yaml, Haml
Influenced Less
OS Cross-platform
License MIT License

Sass (Syntactically Awesome Stylesheets) is a stylesheet language initially designed by Hampton Catlin and developed by Nathan Weizenbaum. It is best described as a meta-language on top of CSS, and is meant to abstract CSS code and create simpler stylesheet files. After its initial versions, Nathan Weizenbaum and Chris Eppstein have continued to extend Sass with SassScript, a Turing Complete scripting language used in Sass files.

Nested Rules

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

  background: #FFFFFF   
  /* -or-  :background #FFFFFF

    color: #FF0000

    text-decoration: none
      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

  :color = !link_color

Would compile to

a {
  color: #00F

External links

Personal tools

Served in 0.487 secs.