mat-input: text in input element does not respect theme when using dark theme
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
The input should have a text color that respects the selected theme
What is the current behavior?
If a matInput
is placed within a container that uses a mat-dark-theme
color scheme, the text color in the matInput
remains black, while every other aspect of the form field respects the dark theme and turns light.
What are the steps to reproduce?
https://stackblitz.com/edit/mat-input-dark-theme-bug
What is the use-case or motivation for changing an existing behavior?
The input should be readable when using dark theme
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Testet using Angular Material v6.4.7 and 7.0.3, and the error is in both versions.
Is there anything else we should know?
No
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Angular Material Input does not have white text with dark theme
Update -. I just opened this for the first time in a few days, and now it is showing the text as white...
Read more >Input field not visible in Angular Material Dark Themes — Solved
css theme. The primary glitch which is noted is that, when a mat-input is consolidated, the field fringe and the content cursor isn't...
Read more >Creating a custom form field control - Angular Material
Note that the method by default will not respect element ids that have been set manually on the control element through the aria-describedby...
Read more >angular/material/_theming.scss - UNPKG
243 .cdk-text-field-autofill-monitored:not(:-webkit-autofill) { ... 1283, // Background palette for dark themes. 1284, $mat-dark-theme-background: (.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes mmalerba - you can do that. However, changing the accent color to accommodate mat-form-field completely changes the entire theme. So… no. That’s really not a good fix. Bottom line - - Material’s dark-theme is worthwhile as long as there is no requirement for data input. Otherwise, it seems to be worthless.
Surprised that this issue isn’t getting more attention. The dark mode is unusable in its current condition.