Why mixin not working?

postcss-mixins
@define-mixin media $from, $to {

 $line: "(max-width: 1500px)";

 @if $from > 0 {
 $line: "(min-width: $(from)";
}

 @if $to > 0 {
 @if $from > 0 {
 $line: "$(line) and (max-width: $(to))";
 } @else {
 $line: "(max-width: $(to))";
}
}

 @media screen and $(line) {
@mixin-content;
}
}


Code comillinois but somehow it does not work out, I found out that the campaign does not fulfill the line "@media screen and $(line) " in $line is text that is needed...but why is not clear
June 27th 19 at 15:01
1 answer
June 27th 19 at 15:03

Find more questions by tags CSSSass