[英]How do I access my main theme colors from another scss file?
I have your standard Angular Material theme going on.我有你的标准 Angular Material 主题。 Here's my theme.scss file:
这是我的 theme.scss 文件:
@import '~@angular/material/core/theming/all-theme';
@include mat-core();
$candy-app-primary: mat-palette($mat-light-blue);
$candy-app-accent: mat-palette($mat-red, A200, A100, A400);
$candy-app-warn: mat-palette($mat-yellow);
$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent, $candy-app-warn);
@include angular-material-theme($candy-app-theme);
您必须将该sass文件导入yours.so sass编译器才能到达主题上下文
尝试background-color: map-get($candy-app-accent, A100);<\/code>
"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.