Skip to content

Commit dfe3236

Browse files
authored
fix(material/datepicker): adjust focused date background for better visibility (#21176)
1 parent f0f3748 commit dfe3236

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/material/datepicker/_datepicker-theme.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3737
box-shadow: inset 0 0 0 $mat-datepicker-selected-today-box-shadow-width
3838
mat-color($palette, default-contrast);
3939
}
40+
41+
.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
42+
.cdk-keyboard-focused .mat-calendar-body-active,
43+
.cdk-program-focused .mat-calendar-body-active {
44+
& > .mat-calendar-body-cell-content {
45+
@include _mat-datepicker-unselected-cell {
46+
background-color: mat-color($palette, 0.3);
47+
}
48+
}
49+
}
4050
}
4151

4252
// Utility mixin to target cells that aren't selected. Used to make selector easier to follow.
@@ -92,16 +102,6 @@ $mat-calendar-weekday-table-font-size: 11px !default;
92102
color: $disabled-color;
93103
}
94104

95-
.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
96-
.cdk-keyboard-focused .mat-calendar-body-active,
97-
.cdk-program-focused .mat-calendar-body-active {
98-
& > .mat-calendar-body-cell-content {
99-
@include _mat-datepicker-unselected-cell {
100-
background-color: mat-color($background, hover);
101-
}
102-
}
103-
}
104-
105105
.mat-calendar-body-in-preview {
106106
$divider-color: mat-color($foreground, divider);
107107

0 commit comments

Comments
 (0)