到目前为止我已经学到了,但我注意到材料设计的开箱即用字体对于不同的组件是不同的 . 对于材质对话框中的材质 Headers 元素, Headers 以精美的Roboto字体显示,但材质对话框内容以罗马字体显示:
enter image description here

这是我对话框的html组件:

<h3 mat-dialog-title>{‌{title}}</h3>
<mat-icon color="primary">error_outline</mat-icon>
<mat-dialog-content>
    <ul>
        <li *ngFor="let error of errorMessages">
          {‌{error}}
        </li>    
      </ul>
</mat-dialog-content>

我不想创建自定义样式,而是宁愿使用与该元素相关联的默认样式 . 如果我加

body {
  font-family: Roboto, Arial, sans-serif;
  margin: 0;
}

我的gobal styles.css修复了mat-dialog-content中的字体,但我宁愿不必这样做 .

此外,图标非常小,您可以清楚地看到开箱即用 . 有没有办法在运行时从图标库中选择一个更大的图标集?提前致谢!