1.alert {
2 // The parent selector can be used to add pseudo-classes to the outer
3 // selector.
4 &:hover {
5 font-weight: bold;
6 }
7
8 // It can also be used to style the outer selector in a certain context, such
9 // as a body set to use a right-to-left language.
10 [dir=rtl] & {
11 margin-left: 0;
12 margin-right: 10px;
13 }
14
15 // You can even use it as an argument to pseudo-class selectors.
16 :not(&) {
17 opacity: 0.8;
18 }
19}
20