I'm working on an Angular 9 project where I'm creating two themes and each theme has it's own css output file.
I modified the angular.json
file to handle that:
"styles": [
{
"input": "src/styles/themes/light-theme.scss",
"lazy": true,
"bundleName": "light-theme"
},
{
"input": "src/styles/themes/dark-theme.scss",
"lazy": false,
"bundleName": "dark-theme"
}
],
light-theme
and dark-theme
are my input files, where I'm setting variables like:
- $background-color
- $button-color
- $text-color
- etc, etc.
My problem is that I cannot use those variables from each component, because my component won't know what those variables are. I cannot import one or another theme, because I would like to use the values that I declared in the input file. How should I handle this? Is there any way of "importing" the input file I wrote on my angular.json file?
Thanks!