I'm trying to modify the font size of the text in the placeholder attribute of a text area element. I can do this using vanilla CSS, but when I attempt to mimic the idea in my app--an Angular 2 app using Angular Material 2--I cannot obtain the desired behavior. In vanilla HTML/CSS I can simply do the following:
HTML:
<textarea id="foo" placeholder="goodbye enemy!"></textarea>
CSS:
#foo::-webkit-input-placeholder{font-size: 100%;}
I simply modify the percentage value to modify the size of the placeholder text. However, when I attempt to try the same approach with Angular Material, I cannot modify the font size.
The Angular Material 2 doc on the input directive is here: Docs on the Angular 2 Material Input Directive. I've played around with the plnkr associated to it but cannot modify the placeholder text using the given approach. Does anyone know why? The docs state that the <md-input-container>
is simply a wrapper for the native input/textarea tags so I am not sure if it is overriding some sort of behavior in the background. Any help would be appreciated.