'How to use multiple & in scss?

when i tried to convert this less code to scss.

.a {
  &-b&-c {
    color: white;
  }
}

error occur like this:

Error at Ln 2,Col 8:
Invalid CSS after "-b": expected "{", was "&-c"

"&-c" may only be used at the beginning of a compound selector.

How to use multiple & in scss?



Solution 1:[1]

You need to use interpolation:

.a {
  &-b#{&}-c {
    color: white;
  }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Arkellys