Reputation: 752
Recently I have been trying out stylus after been using scss for quite some time. I have though not found a way to write the following scss with the stylus syntax. Does anyone have any solution to this. Any thoughts very appreciated.
@mixin attention() {
&:hover,
&:active,
&:focus {
@content;
}
}
a {
font-weight: bold;
text-decoration: none;
color: #c00;
@include attention() {
outline: none;
color: #09f;
}
}
Upvotes: 4
Views: 433
Reputation: 752
This is possible: https://learnboost.github.io/stylus/docs/mixins.html#block-mixins
attention() {
&:hover,
&:active,
&:focus {
{block}
}
}
a {
font-weight: bold;
text-decoration: none;
color: #c00;
+attention() {
outline: none;
color: #09f;
}
}
Upvotes: 4