我想集成我的角4.x项目的自定义字体,它在资产文件夹中。我用的是角质材料。因此,对于材料,我在我的styles.sass中设置了定制的排版
下面是代码:
@import '~@angular/material/theming'
$used-fonts : 'Avenir', arial
$general-typography : mat-typography-config(
$font-family: quote($used-fonts)
)
@include mat-core($general-typography)我所犯的错误:
Invalid CSS after "...ography-config(": expected expression (e.g. 1px, bold), was "{"在:给了我一个错误
知道吗?
发布于 2017-11-15 12:28:13
我建议你在一条线内试试。它将将其视为嵌套值。
$general-typography : mat-typography-config($font-family: quote($used-fonts))发布于 2017-11-15 11:15:52
我建议在每个声明之后添加分号。CSS在每个声明之后需要一个分号,除了规则中的最后一个声明(这是可选的),我认为SASS也是这样。
@import '~@angular/material/theming';
$used-fonts : 'Avenir', arial;
$general-typography : mat-typography-config(
$font-family: quote($used-fonts)
);
@include mat-core($general-typography);https://stackoverflow.com/questions/47304406
复制相似问题