I'm start experimenting with Angular Material (0.8.3 version to be specific).
From code of theming related directives and mdThemingProvider source code I'm found that light foreground is defined for dark theme. But text for text paragraphs remains dark as for default.
Even with their example code for Input Demo there color problem. When you delete content of title and e-mail input field placeholder text turns into dark grey so it is almost invisible.
I'm only starting looking through their library source code and can not find out how to active changing text for paragraphs and placeholders to contrast one.
From briefly looking at core/services/theming/theme.palette.js file I found some palettes properties with name prefix contrast. So I think they defines colors to be visible on dark theme. But how to active theme to using them?
Have anyone good suggestion to archive readable content on dark theme without many additional coding?
If this do not breaks dynamic changing theme of entire application (through calling $mdThemeProvider from js code) it would be wonderful.
I ran into this as well and I was able to solve in satisfactorily in my case (Angular Material v0.9.6) by setting the
foregroundPalette
of the theme:You can see a demo here and compare it to the original foreground. This doesn't seem to be publicly documented, so it might be internal to AM and in fact it will change the foreground for your entire app, even if you are using multiple themes.
There are four shades for foreground, and they have different values for light vs. dark themes. Here are the defaults (from AM source):
As for why I picked
3
, it happens to be the shade used bymd-input-container
, which I found by trial and error.