Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

767
Views
How to change color for mat-divider?

Is it possible to change mat-divider color? I tried the following, it didn't work

component.html

<mat-divider class="material-devider"></mat-divider>

component.scss

.material-devider {
    color: red
}
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

If you can.

You must override the .mat-divider class style in your own written CSS and change the border-top-color property.

 .mat-divider { border-top-color: rgba(0, 0, 0, 0.12); }

is the default style of Angular Material.

 .mat-divider { border-top-color: red; }

This should be enough to change it (if your CSS renders later than Material's). If not, adding more specificity to your CSS class will help ( .mat-divider.mat-divider ).

StackBlitz example for this case .

over 4 years ago · Santiago Trujillo Report

0

To change the mat-divider color simply change the border-top-color property of the .mat-divider class.

 .mat-divider { border-top-color: red; }

https://www.angularjswiki.com/angular/angular-material-divider-mat-divider-example/#mat-divider-color

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!