Sass - 使用 material 网络组件设置字体系列

Sass - Setting the font family with material web components

我在我的项目中使用 material 网络组件,我想更改字体系列。我正在浏览他们的 documentation 并尝试通过在我的 sass 文件中设置变量来做到这一点:

$mdc-typography-font-family: Comfortaa, sans-serif !default;

但是,那没有用,在文档中它还说 sass mixin 设置了字体:

mdc-typography-base 

如何更改 mixin 以使用不同的字体系列?

我通过删除 !default 标志解决了这个问题:

$mdc-typography-font-family: Comfortaa, sans-serif;

此外,不要忘记在 head 标签中嵌入 Google 字体:

<link href="https://fonts.googleapis.com/css?family=Comfortaa" rel="stylesheet">