0

I am writing application (Angular2 framework). And now I want to make different variables in sass files at development and production.

For example I want to use this solution:

@if $prod == true {
  $background-color: #fff;
} @else {
  $background-color: #333;
}

And i have $prod variable in my typescript file. But how i can pass it from typescript file to sass file?

John Doe
  • 3,794
  • 9
  • 40
  • 72

1 Answers1

1

Your options are:

  1. Parse the scss file in the backend
  2. Apply the style in javascript rather than the other way around
taropoo
  • 110
  • 2
  • 8