Home

Search IconIcon to open search

SCSS syntax

# Nesting

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
content {
  ul {
    li {
      font-style:italic;
    }
  }
  ol {
    li {
      font-decoration:underline;
    }
  }
}

You can use & for referencing the topmost class:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
button {
  background-color: #535353;
  color: #000;
  &:hover {
    background-color: #000;
    color: #fff;
  }
  &-cool {
    // selects .button-cool elements
  }
}