1

From my Html:

<mat-accordion>
  <div class='left_panel_content2'>
    <mat-expansion-panel>
      <mat-expansion-panel-header>
        <mat-panel-title>
          ADD NEW
        </mat-panel-title>
        <mat-panel-description>
        </mat-panel-description>
      </mat-expansion-panel-header>
      <div class="accordion_reveal">
        <mat-form-field>
          <input id="pop" matInput placeholder="List Name" [(ngModel)]="newList.name" name="name" type="text" class="form-control rounded-0" required>
        </mat-form-field>
        <mat-form-field>
          <input matInput placeholder="List Type" [(ngModel)]="newList.type" name="type" type="text" class="form-control rounded-0" [matAutocomplete]="auto" required>
        </mat-form-field>
        <mat-autocomplete #auto="matAutocomplete">
          <mat-option *ngFor="let option of options" [value]="option">
            {{option}}
          </mat-option>
        </mat-autocomplete>
        <div class="btnForm">
          <button (click)="addList()" type="button" class="btn btn-primary float-right">Create New</button>
        </div>
      </div>
    </mat-expansion-panel>
  </div>
</mat-accordion>

I am trying to format the placeholder/auto fill labels, I have researched online how to override the style but what I have tried has no effect on the label.

I would like to override the label style because for one the text overlap with the Textbox.

Css tried:

.mat-input-placeholder {
  top: -.7em;
  color:white;
  font-weight: bold; 
}
Dev
  • 1,780
  • 3
  • 18
  • 46
  • Possible duplicate of [Change an HTML5 input's placeholder color with CSS](https://stackoverflow.com/questions/2610497/change-an-html5-inputs-placeholder-color-with-css) – divy3993 Dec 26 '18 at 20:00
  • I have tried the answers in the link that you have provided but it has no effect, I am using `@import "~@angular/material/prebuilt-themes/indigo-pink.css";` not sure if is `HTML5` but most of the answers I tried I get greens lines with ..is not a valid pseudo-element – Dev Dec 26 '18 at 20:17

0 Answers0