1

How to style Select List from Angular Material:

 <md-select placeholder="Favorite food" [(ngModel)]="selectedValue" name="food">
    <md-option *ngFor="let food of foods" [value]="food.value">
      {{food.viewValue}}
    </md-option>
  </md-select>

For example, I need to make border and add arrow on the right corner.

How to do this in Material, just to modify CSS file or does exist special approach?

2
  • You need to put border around each option or the select panel? Does the arrow in the right corner do anything, or just an icon? Commented Jul 31, 2017 at 23:37
  • I tried to set CSS for mat-select-placeholder as` {display: none !important;}` It does not work Commented Aug 1, 2017 at 13:16

1 Answer 1

1

You can modify (or include your own new) CSS file that has the required design changes.

select boxes can be tricky to stylize and an md-menu offers more flexibility if you require it.

Sign up to request clarification or add additional context in comments.

2 Comments

I try to changes CSS styles in style.css of components file like this: .mat-tab-label { border-radius: 3px; background-color: #eeeeee; }. But it does not repalce Angular Material styles.
You can use background-color: #eeeeee !important; to force the override. I can't be sure your class naming is correct from the information in the question though.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.