Sass Basics

@import

@import './other\_sass\_file';
@import '/code', 'lists';
// Plain CSS @imports
@import "theme.css";
@import url(theme);

The .sass or .sass extension is optional.

Extend

.button {
    ···
}
.push-button {
    @extend .button;
}

Nesting

.markdown-body {
    a {
      color: blue;
      &:hover {
        color: red;
      }
    }
}

#to properties

text: {
    // like text-align: center
    align: center;          
    // like text-transform: uppercase
    transform: uppercase; 
}

Mixins

@mixin heading-font {
    font-family: sans-serif;
    font-weight: bold;
}
h1 {
    @include heading-font;
}

See: Mixins

Comments

/\*
 Block comments
 Block comments
 Block comments
\*/
// Line comments

String interpolation

$wk: -webkit-;
.rounded-box {
  #{$wk}border-radius: 4px;
}

Variables

$defaultLinkColor: #46EAC2;
a {
  color: $defaultLinkColor;
}

Introduction

Comments