css - CSS 覆盖 - MAT-TABLE - Angular Material 11
问题描述
我正在尝试根据我的视觉设计更改 MAT-TABLE。为此,我将覆盖材料的 css,如下所示。现在我可以按照 VD 看到我的桌子了。但我不知道这是覆盖材料 css 的正确方法。
会有什么影响?
影响意味着 -:host ::ng-deep
它会影响我的应用程序中的任何其他 CSS 吗?
我要继续这样吗?或者这是覆盖CSS的任何干净方式。但是通过这样做,只有 mat-table 会采用这些更改。顺便说一句,我的 mat-table 是可重复使用的组件。
.mat-paginator,
:host ::ng-deep.mat-form-field-infix {
background-color: #EDF2F7;
}
:host ::ng-deep.mat-paginator .mat-paginator-container,
:host ::ng-deep.mat-paginator-navigation-previous,
:host ::ng-deep.mat-paginator-navigation-next,
:host ::ng-deep.mat-select-value,
:host ::ng-deep.mat-select-arrow {
color: #626C7A !important;
}
解决方案
推荐阅读
- java - Java:Eclipse 控制台不显示 Spring Controller 信息
- pytorch - pytorch:如何在数据加载器中使用图片作为标签?
- node.js - 如何将路由器放入功能并导出?
- python-3.x - AttributeError:“datetime.datetime”对象没有属性“striftime”
- javascript - SyntaxError:导入声明只能出现在模块的顶层。使用 express,没有 webpack
- firebase - Firebase 推送通知减少发送消息
- c# - Automapper 8 Ignore Attribute 不适用于子后代
- react-native - 执行react-native run-android时如何在新终端中显示metro bundler?
- kubernetes - Kubernetes 是否可以选择拥有一个引用所有其他清单文件的主清单文件
- laravel - 一张桌子有多个型号可以吗