Reputation: 1625
placeholder is red in color before i enter text into it , i want my placeholder to stay in default color
HTML
<textarea #myInput id="myInput" rows="1" placeholder="Enter Question here" maxLength="100" (keyup)="resize()" [(ngModel)]="addQuestion">
</textarea>
SCSS file
#myInput {
width: calc(100% - 10px);
border: 0;
border-radius: 0;
background: transparent;
}
ts file
@ViewChild('myInput') myInput: ElementRef;
resize() {
this.myInput.nativeElement.style.height = this.myInput.nativeElement.scrollHeight + 'px';
}
Upvotes: 0
Views: 3416
Reputation: 29614
Ionic uses autoprefixer in its build process.
you could use the psuedo-element ::placeholder
. Try
#myInput::placeholder{
color:red
}
Upvotes: 4