Kronuz / pyScss

pyScss, a Scss compiler for Python
MIT License
582 stars 141 forks source link

Expressions do not work in media queries #347

Open matharden opened 9 years ago

matharden commented 9 years ago

The following code should evaluate the variable expression

$breakpoint: 500px;

@media (max-width: $breakpoint - 1) {
  main {
    color: red;
  }
}

to output this CSS…

@media (max-width: 499px) {
  main {
    color: red;
  }
}

but instead results in the following invalid CSS…

@media (max-width: $breakpoint - 1) {
  main {
    color: red;
  }
}

My current work-around is to use interpolation…

@media (max-width: #{$breakpoint - 1}) {
  main {
    color: red;
  }
}