Skip to content

Commit 3889bf4

Browse files
annieywmmalerba
authored andcommitted
fix(material/datepicker): adjust focused date background for better visibility (#21176)
(cherry picked from commit dfe3236)
1 parent d84d3d0 commit 3889bf4

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
@@ -38,6 +38,16 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3838
box-shadow: inset 0 0 0 $mat-datepicker-selected-today-box-shadow-width
3939
mat-color($palette, default-contrast);
4040
}
41+
42+
.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
43+
.cdk-keyboard-focused .mat-calendar-body-active,
44+
.cdk-program-focused .mat-calendar-body-active {
45+
& > .mat-calendar-body-cell-content {
46+
@include _mat-datepicker-unselected-cell {
47+
background-color: mat-color($palette, 0.3);
48+
}
49+
}
50+
}
4151
}
4252

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

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

0 commit comments

Comments
 (0)