I am having trouble understanding how to use certain Bootstrap SCSS functions within a Angular component, such as theme-color or color.
I have a component.scss that looks like:
.card {
cursor: pointer;
&:hover {
background-color: theme-color("primary");
}
}
But this doesn't work, without error may I add. If I prepend: @import '~node_modules/bootstrap/scss/bootstrap'; to the file it does, however, it doesn't take into account my global styling, it uses the default colours.
If I import only the functions SCSS then it doesn't understand the other imports, such as the ones that contain the vars, like $color.
Everything works fine when editing in my global styles.scss stylesheet.
It seems as though something about the view encapsulation is stopping global SCSS functions from Bootstrap filtering down to my component SCSS but I cannot quite find out what it is.
So, how do I get global SCSS functions, such as Bootstrap's into my individual component SCSS files?