| 1 |
$Selectors: (); |
| 2 |
|
| 3 |
////////////////////////////// |
| 4 |
// Add selectors of various depths and makeups |
| 5 |
////////////////////////////// |
| 6 |
.foo { |
| 7 |
$Selectors: append($Selectors, &) !global; |
| 8 |
} |
| 9 |
|
| 10 |
.bar a { |
| 11 |
$Selectors: append($Selectors, &) !global; |
| 12 |
} |
| 13 |
|
| 14 |
.bar, |
| 15 |
.baz { |
| 16 |
$Selectors: append($Selectors, &) !global; |
| 17 |
} |
| 18 |
|
| 19 |
.qux { |
| 20 |
&.waldo { |
| 21 |
.where & { |
| 22 |
.final { |
| 23 |
$Selectors: append($Selectors, &) !global; |
| 24 |
} |
| 25 |
} |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
////////////////////////////// |
| 30 |
// Display Results |
| 31 |
////////////////////////////// |
| 32 |
.result { |
| 33 |
length: length($Selectors); |
| 34 |
content: $Selectors; |
| 35 |
@for $i from 1 through length($Selectors) { |
| 36 |
index: $i; |
| 37 |
length: length(nth($Selectors, $i)); |
| 38 |
content: nth($Selectors, $i); |
| 39 |
} |
| 40 |
} |