2

I have a setup an AngularJS app (1.3) with Angular Material (v10.1) - when I click into a input field (eg it is in focus) that is setup to use Material Design the label text changes to the default colour of blue - I want to change this to a color of my choice how is the best way to do this.

<md-input-container class="md-block">
  <label>Name</label>
  <input required>
</md-input-container>

Once I focus on the input field above the label changes the colour of the text 'Name' to blue - what is the recommended way to change this to another colour in Material Design?

hirse
  • 2,394
  • 1
  • 22
  • 24
Zabs
  • 13,852
  • 45
  • 173
  • 297

1 Answers1

2

This selector for default state

md-input-container:not(.md-input-invalid).md-input-has-value label {
      color: #000; // your color here
}

Focused state

md-input-container:not(.md-input-invalid).md-input-focused label {
      color: #000; // your color here
}
Leguest
  • 2,097
  • 2
  • 17
  • 20