Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Checkbox Size in Angular Material Selection List

Is it possible to change the size of the checkbox in an Angular Material Selection List? I've tried changing the size of the mat-pseudo-checkbox in CSS but that results in the checkmark not being placed properly:

mat-pseudo-checkbox {
  height: 10px;
  width: 10px;
}

Checkmark improperly placed

Is there another selector that I need to adjust to correct this?

like image 433
tgordon18 Avatar asked Aug 28 '18 18:08

tgordon18


2 Answers

With Angular 7 I succeeded with:

mat-checkbox ::ng-deep .mat-checkbox-inner-container {width: 30px;height: 30px;}
like image 198
bresleveloper Avatar answered Sep 20 '22 22:09

bresleveloper


I was facing the similar issue and tried the below CSS, which seems to work in Angular 8:

::ng-deep .mat-checkbox .mat-checkbox-inner-container {
    width: 30px;
    height: 30px;
}

I have added a sample width and height; please customize these to what you need.

like image 42
Kishor Shivane Avatar answered Sep 22 '22 22:09

Kishor Shivane