[ACA-2476] Fix color contrast in mat-calendar (#5609)

This commit is contained in:
Baptiste Mahé
2020-04-15 16:58:50 +02:00
committed by GitHub
parent 049cedfb26
commit bb74dbf9a0
2 changed files with 57 additions and 0 deletions

View File

@@ -74,5 +74,7 @@
@include adf-clipboard-theme($theme);
@include adf-snackbar-theme($theme);
@include mat-expansion-panel-theme--fix($theme);
@include mat-calendar-theme--fix($theme);
@include mat-datetimepicker-theme--fix($theme);
@include adf-search-text-input-theme($theme);
}

View File

@@ -80,3 +80,58 @@
}
}
}
@mixin mat-calendar-theme--fix($theme) {
$foreground: map-get($theme, foreground);
.mat-calendar {
.mat-calendar-header {
button {
color: mat-color($foreground, text, 0.87);
&:disabled {
color: mat-color($foreground, text, 0.54);
}
}
}
.mat-calendar-content {
.mat-calendar-table-header th {
color: mat-color($foreground, text, 0.54);
}
.mat-calendar-body-disabled > div {
color: mat-color($foreground, text, 0.54) !important;
}
}
}
}
@mixin mat-datetimepicker-theme--fix($theme) {
$foreground: map-get($theme, foreground);
.mat-datetimepicker-calendar {
.mat-datetimepicker-calendar-header {
.mat-datetimepicker-calendar-header-year {
opacity: 1;
}
.mat-datetimepicker-calendar-header-date {
opacity: 1;
}
.mat-datetimepicker-calendar-header-time {
opacity: 1;
}
}
.mat-datetimepicker-calendar-content {
.mat-datetimepicker-calendar-table-header th {
color: mat-color($foreground, text, 0.54);
}
.mat-datetimepicker-calendar-body-disabled > div {
color: mat-color($foreground, text, 0.54);
}
}
}
}