我想为 Assets 文件夹中的 Angular 4.x 元素集成我的自定义字体。我正在使用 Angular Material 。所以对于 Material ,我在我的 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 "{"
在 处给我一个错误:
有什么想法吗?
最佳答案
我建议你应该在一行内尝试。它会将其视为嵌套值
$general-typography : mat-typography-config($font-family: quote($used-fonts))
关于css - Sass 错误 : Invalid CSS after "typography-config" angular 4. x,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47304406/