Does Sass have a selector to refer to the element at the current nesting level? That way duplication like this could be avoided:
.something {
color: red;
a {
color: red; // a tags are already styled globally
}
}
And I could write this instead.
.something {
self, a {
color: red;
}
}
There is a good new feature in the Sass 3.3 - @at_root
.something {
&, a {
color: red;
}
}
More variants of using this feature you can find here:
https://github.com/nex3/sass/issues/774
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With