1

what i want to do is basically this:

    @media all and (min-width: 700px) {
$dimension:96px;
$dimension-white:76px;
}

@media all and (max-width: 699px) {
$dimension:76px;
$dimension-white:56px;
}

is it possible to assign different values to scss variables based on media-queries? thank you much!

Fabrizio Calderan
  • 120,726
  • 26
  • 164
  • 177
valerio0999
  • 11,458
  • 7
  • 28
  • 56

1 Answers1

4

Though this is a dupe, the answer is no. Media queries are handled by the browser and SASS variables are handled by, you guessed it, SASS.

What you have here would probably get compiled as-is into your stylesheet and break it or not get compiled at all. I haven't tried it because it just doesn't work.

imjared
  • 19,492
  • 4
  • 49
  • 72