Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

SASS: hierarchy structure

0 votes
22 views
added Aug 22, 2017 in SCSS by LC Marshal Captain (20,510 points)
// Instead of
.btn {
  color: red;
}

.btn-min, .btn-min--grey-border {
  color: pink;
}

.btn-min--grey {
border: 1px solid grey;
}

// do this
.btn {
 color: red;
 &-min {
  color: pink;
  &--grey-border {
    border: 1px solid grey;
  }
 }
}

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...