2017-12-29 8 views
1

Dieser einfache Code:Text in matt-raised-Taste ist unsichtbar innerhalb mat-Symbolleiste

<mat-toolbar color="primary"> 
    <button mat-raised-button>Basic</button> 
</mat-toolbar> 
<button mat-raised-button>Basic</button> 

Gib mir dieses Ergebnis: screenshot

Es scheint, dass es ein Know Fehler ist: https://github.com/angular/material2/issues/4614

Ich brauche eine saubere Workaround, kann mir jemand helfen? Danke.

+0

Dies ist ein bekanntes Problem. Soll die Schaltfläche in der Symbolleiste weiß sein? – Faisal

+0

Ich benutze ein benutzerdefiniertes Thema und ich habe dieses Problem nicht. Auch, was ist deine eckige Materialversion? –

+0

Nein, ich möchte, dass die Textfarbe unverändert bleibt (die grundlegende Textfarbe des Themas), wenn möglich, ohne eine schmutzige schwarze Textfarbe im scss der Komponente fest codieren zu müssen. –

Antwort

0

Ich schrieb mein Thema in /style.scss. Die Farbe, die ich für meine Primärpalette gewählt habe, beeinflusst die Reproduzierbarkeit des Programmfehlers.

Für exemple, tut dies nicht funktioniert:

$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); 

Aber das funktioniert:

$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); 

ich nur veränderte $ mat-Indigo $ mat-grün und jetzt ist mein Text ist sichtbar screenshot

Was ist los?

Verwandte Themen