如何通过angular material theming机制调整mat-toolbar背景色实现个性化主题设计?
- 内容介绍
- 文章标签
- 相关推荐
本文共计667个文字,预计阅读时间需要3分钟。
最近学习 Angular,记录一下昨天的进展。解决了的问题是,通过修改 theme 的配置来改变 mat-toolbar 的背景色,避免了硬编码颜色。
首先,通过 mat-toolbar 的实现源代码 `_to` 来进行修改。
最近在学习 angular,记录一下昨天的进展,解决的问题是通过 theme 的配置修改 mat-toolbar 的背景色,避免对色彩的硬编码。
首先通过 mat-toolbar (以下统一称为 toolbar)的实现源代码 _toolbar-theme.scss 得知背景色来自 theme 中 background palette 的 app-bar。
本文共计667个文字,预计阅读时间需要3分钟。
最近学习 Angular,记录一下昨天的进展。解决了的问题是,通过修改 theme 的配置来改变 mat-toolbar 的背景色,避免了硬编码颜色。
首先,通过 mat-toolbar 的实现源代码 `_to` 来进行修改。
最近在学习 angular,记录一下昨天的进展,解决的问题是通过 theme 的配置修改 mat-toolbar 的背景色,避免对色彩的硬编码。
首先通过 mat-toolbar (以下统一称为 toolbar)的实现源代码 _toolbar-theme.scss 得知背景色来自 theme 中 background palette 的 app-bar。

