我正在玩物质主题 其中有一个选项可以选择主要,重音和警告,如下所示
$candy-app-primary: mat-palette($mat-indigo, 500, 50, A200);
$candy-app-accent: mat-palette($mat-pink, A200, A100, A400);
$candy-app-warn: mat-palette($mat-red);
$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent,
$candy-app-warn);
@include angular-material-theme($candy-app-theme);
在我的HTML中
<md-toolbar class="mat-primary">
<!-- above line works perfectly -->
<md-toolbar color="primary">
<!-- above line works perfectly (both are getting 500)-->
<md-toolbar class="mat-primary-lighter">
<!-- need some kind of implementation to access the weight 50(lighter) or
A200 (darker)-->
<div class="mat-primary">
<!-- above is not working on general div bit it should work as it is
general class-->
有没有办法在不使用scss之类的东西的情况下生成此功能,如
.someClass { background:mat-color($mat-indigo, 50) }