ui-material-components icon indicating copy to clipboard operation
ui-material-components copied to clipboard

Unable to change placeholder-color based the theme with css

Open tostamista23 opened this issue 3 years ago • 0 comments

Android 11 Xiaomi Redmi Note 9 and 10.1" EWXGA(tablet) TNS: 7.1.2 ui-material-textfield: 5.2.10 (current version doesnt work, #259)

I would like to change white placeholderColor only on light theme.

.ph  {
  placeholder-color: red;
}

Works fine but as mentioned before i only want to change it on light theme which it doesn't seem to work with .ns.light

HTML <MDTextField [(ngModel)]="login.username" hint="Username" class="ph" returnKeyType="next"></MDTextField>

CSS

.ns-light .ph  {
  placeholder-color: red;
}
//or 
:host-context(.ns-light) .ph  {
  background-color: red;
}

I tried to get the current theme but Theme.getMode() returns 'Auto'

tostamista23 avatar May 06 '21 17:05 tostamista23