[英]Text in mat-raised-button is invisible within mat-toolbar
這個簡單的代碼:
<mat-toolbar color="primary">
<button mat-raised-button>Basic</button>
</mat-toolbar>
<button mat-raised-button>Basic</button>
給我這個結果: 屏幕截圖
看來這是一個已知的錯誤: https : //github.com/angular/material2/issues/4614
我需要一個干凈的解決方法,有人可以幫助我嗎? 謝謝。
我在/style.scss中寫了我的主題。 我為主調色板選擇的顏色會影響該錯誤的可復制性。
例如,這不起作用:
$candy-app-primary: mat-palette($mat-indigo);
$candy-app-accent: mat-palette($mat-pink, A200, A100, A400);
// The warn palette is optional (defaults to red).
$candy-app-warn: mat-palette($mat-red);
// Create the theme object (a Sass map containing all of the palettes).
$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent, $candy-app-warn);
但這有效:
$candy-app-primary: mat-palette($mat-green);
$candy-app-accent: mat-palette($mat-pink, A200, A100, A400);
// The warn palette is optional (defaults to red).
$candy-app-warn: mat-palette($mat-red);
// Create the theme object (a Sass map containing all of the palettes).
$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent, $candy-app-warn);
我只是改變$墊靛藍至$墊綠色,現在我的文字是可見的屏幕截圖
這是怎么回事 ?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.