I defined a variable like this in the global scss called styles.scss in angular6
$color-redpink-dark: #E84A5F;
and I want to use the variable in a scss component, but when I declare the property I have the next output:
background-color: $color-redpink-dark;
Undefined variable: "$color-redpink-dark".
Should not the component scss use the color defined in the global scss?
Greetings.
styles.scssfile should be physically inside the src/global folder) so I want to inspect how you are declaring the variables. If all is good, then you can use the @import command to load your global scss file into your component.