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
  • 115,126
  • 25
  • 163
  • 167
valerio0999
  • 10,407
  • 7
  • 27
  • 55

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
  • 17,386
  • 3
  • 45
  • 71