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

341
Views
Angular Material2 md-checkbox border color

I am using Angular Material 2 and I am trying to apply css on md-checkbox. So far I managed to change background color, but there is no documentation on how to apply on border color.

My code for height-width:

:host /deep/ .mat-checkbox-inner-container{
     height:15px;
     width:15px; 
}

code for background color on check:

 :host /deep/  .mat-checkbox-checked .mat-checkbox-background {
    background-color: #72addc;
} 

but still cannot apply on border color.

Any help is welcome!

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

For Angular 5+ version

/deep/ .mat-checkbox-frame { 
    border-color: grey 
}

You can learn more about styling components here https://angular.io/guide/component-styles

about 4 years ago · Santiago Trujillo Report

0

For Angular 8

::ng-deep .mat-checkbox-frame {
  border-color: white
}
about 4 years ago · Santiago Trujillo Report

0

I like to add that "/deep/" is deprecated Now. [from version 8] use "::ng-deep" instead of "/deep/"

First time I removed ":host" but after removing it did not work properly. So I added it again.

CSS Using for Border Color:

:host ::ng-deep .mat-checkbox-frame { 
    border-color: white 
}

CSS Using for Background color change:

:host ::ng-deep  .mat-checkbox-checked .mat-checkbox-background {
    background-color: #01ADE4;
} 
about 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!