In my global stylesheet, I made changes like the example below (extracted from my actual code, assuming I have
<body class="my-app">...</body>
) and written in
scss. I customized styles of classes defined in Angular Material, particularly those related to checkboxes as shown here:
.my-app {
.mat-pseudo-checkbox-checked {
background-color: #000;
}
.mat-checkbox-frame {
border-radius: 0 !important;
}
.mat-checkbox-checked,
.mat-checkbox-indeterminate {
.mat-checkbox-background {
background-color: #000;
border-radius: 0 !important;
}
}
.mat-mdc-checkbox {
--mdc-checkbox-selected-checkmark-color: #ffffff;
--mdc-checkbox-selected-icon-color: #000000;
--mdc-checkbox-selected-focus-icon-color: #000000;
--mdc-checkbox-selected-hover-icon-color: #000000;
--mdc-checkbox-selected-pressed-icon-color: #000000;
--mdc-checkbox-state-layer-size: 0;
--mdc-checkbox-unselected-focus-state-layer-opacity: 0;
&.mat-mdc-checkbox-disabled {
.mdc-checkbox {
.mdc-checkbox__background {
--mdc-checkbox-disabled-selected-icon-color: transparent;
.mdc-checkbox__checkmark {
@include color(inherit);
}
}
}
}
.mdc-checkbox {
.mdc-checkbox__background {
@include square(16px);
}
}
.mdc-form-field {
--mdc-typography-body2-letter-spacing: normal;
}
}
}