私は Sass から Stylus に移行しており、多くの mixin があり、mixin 内で@content
.
例えば...
@mixin respond-min($width) {
// If we're outputting for a fixed media query set...
@if $fix-mqs {
// ...and if we should apply these rules...
@if $fix-mqs >= $width {
// ...output the content the user gave us.
@content;
}
}
@else {
// Otherwise, output it using a regular media query
@media all and (min-width: $width) {
@content;
}
}
}
@include respond-min($mq-group2) {
& {
border: 1px solid green;
}
}
上記のコードをスタイラスに変換したいのですが、スタイラスにはその機能がないように見えるため、これまでの主な問題はコードブロックをミックスインに渡す方法でした。
代替ソリューションはありますか?
どんな助けでも感謝します。