I am looking to utilize the color defined in my CSS file for my ngStyle directive in my HTML code.
Below is the current setup in my HTML:
[ngStyle]="{backgroundColor: isDarkStyle() ? '#29434e' : isNormalStyle() ? '#cfd8dc' : isLightStyle() ? 'white': ''}"
Here are the color definitions from my CSS file:
//colors for background
$light-background: white;
$normal-background: #cfd8dc;
$dark-background: #29434e;
What I want is:
[ngStyle]="{backgroundColor: isDarkStyle() ? '$dark-background' : isNormalStyle() ? '$normal-background' : isLightStyle() ? '$light-background': ''}"
Is there a way I can make this work? Appreciate any help you can provide. Thank you :)