angular - mat-form-field legacy 更改边框颜色
问题描述
我目前正在尝试更改 legacy 的下划线mat-form-field
。现在我测试了很多,包括以下内容:
.mat-form-field-appearance-legacy .mat-form-field-underline,
.mat-form-field-appearance-legacy .mat-form-field-ripple,
.mat-form-field-appearance-legacy.mat-focused .mat-form-field-underline,
.mat-form-field-appearance-legacy.mat-focused .mat-form-field-ripple,
.mat-form-field-appearance-legacy.mat-focused .mat-form-field-legacy-thick {
color: red
}
但是我的下划线仍然是蓝色的。这是我的定义mat-input-field
:
<mat-form-field class="block">
<input type="text" matInput placeholder="{{ 'AUTH.username' | translate }}" formControlName="username" required>
<mat-error *ngIf="submittedForm && loginForm.controls.username.invalid">{{ getErrorMessage('username') }}</mat-error>
</mat-form-field>
提前致谢。
解决方案
推荐阅读
- python - cx_Oracle: fetchall() 停止使用大的 SELECT 语句
- c# - 将图像发送到客户端应用程序的最有效方式是什么?
- angular - HttpInterceptor 和内存数据服务 Angular 7
- c# - ASP.NET Web 窗体 ASP 按钮 OnClick 编译器错误 (CS1061)
- python-3.x - 冒泡排序解释
- aws-step-functions - AWS Step Functions 是否登录 CloudWatch
- xamarin.forms - 如何使用 xamarin 表单获取我当前位置与附近找到的每个位置之间的距离
- c++ - 使用 boost::split 拆分具有多个分隔符的字符串
- r - RStudio v1.1.456 Rpubs上传错误,无登录提示
- python-3.x - 在熊猫中拆分日期时间