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!

1
  • sorry for the copy and paste but it wouldnt let me post :\ Commented Jul 2, 2013 at 15:40

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Dupes don't need answers, they're supposed to get closed.
Ok, then it will get closed?
Eventually (in theory). Moderation is slow in [sass]. Don't feel that you need to delete your answer, just refrain from answering dupes in the future.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.