-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to theme textfield label/placeholder #276
Comments
This issue is also visible in the textfield examples page. Change the theme from the menu on the top-right and see the issue reproduce by clicking on a textfield. On the same topic, it seems I cannot change the color of the hint text either (using textHintOn*) |
@deilv This is a well documented issue with MDC. I actually have a PR proposal open to fix it. material-components/material-components-web#3145 We'll get around to fixing it upstream. In the meantime, a workaround for you (and anywhere else it is a problem) Add this to some global css. Make sure it occurs after your MCW css, or you'll have to add an !important or make it more specific.
|
Thanks a lot for your reply and workaround:) |
Hey! Any updates on that issue? |
Jumping through a bunch or random issues brought me to this one which seems to be the main issue. material-components/material-components-web#4709 The MDC team hears from me often enough about my love of runtime CSS vars. I’d say commenting there or opening an additional issue would show some support. For my projects I generally just maintain a file of those fixes. I’ve been hesitant to add one directly to MDC since the rules can get kind of crazy to fix it but it’s something I can consider. |
After many years of dealing with these types issues, I've added a theme fixes file directly to RMWC that takes care of these little issues since I've had a hard time getting them fixed upstream. Will be out with V6. |
Fixed in 6.0.0. |
@jamesmfriedman Still getting this issue in 6.1.4. Maybe I don't understand the explanation on this page clearly. https://rmwc.io/theme You say to "include both", but I am not sure where or what the theme file is. Can you make it more explicit or give an example? |
I can confirm this is still broken in 6.1.4 this issue also affects the Select element
this does not fix the colour for the drop arrow |
What RMWC Version are you using?
1.8.3
What browser(s) and React Version is this bug affecting?
Safari, Firefox, Chrome
React 16.4.1
What build system are you using?
Webpack
What are the steps to reproduce the bug?
Create a Textfield with a label or placeholder and try to change primary color using ThemeProvider.
Example: https://codesandbox.io/s/pp65870mw7
What is the expected behavior?
Changing primary color should (?) also apply to label/placeholder text or at least a separate attribute should be available like there is for changing hint text.
What is the actual behavior?
Label/placeholder does not change.
Any other information you believe would be useful?
I'm not quite sure this is an issue of rmwc, it may as well be a bug of material-components-web or I may be missing something.
The text was updated successfully, but these errors were encountered: