I have created an angular library and I would like to use the apps primary material color in my libraries css.
An application can define a primary color, assuming $app-primary is defined in my apps theme.scss. However my library of course does not have access to the parent applications variables. If my library is used in two different applications, one that defines pink as primary and one that provides blue as a primary, I would like the library to use it.
$app-primary: mat-palette($mat-blue, 600, 200, 800);
$app-theme: mat-light-theme($app-primary, $app-accent, $app-warn);
@include angular-material-theme($app-theme);
library scss:
.header {
background-color: mat-color(...); // Can I get the applications primary color?
}
Can I obtain the applications primary theme inside my library? I would like the background color of one of my library components to match the applications primary color that it is contained in.