Skip to content

Commit 8245646

Browse files
committed
fix(datepicker): overly broad selector in theme
Currently we've got the `:not(.mat-calendar-body-disabled):hover` selector in the datepicker theme which will match (almost) every single element on the page. This is unnecessary and can end up hurting performance down the road. These changes scope the selector only to datepicker cells.
1 parent 6273d6a commit 8245646

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/datepicker/_datepicker-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;
5959
}
6060
}
6161

62-
:not(.mat-calendar-body-disabled):hover,
62+
.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
6363
.cdk-keyboard-focused .mat-calendar-body-active,
6464
.cdk-program-focused .mat-calendar-body-active {
6565
& > .mat-calendar-body-cell-content:not(.mat-calendar-body-selected) {

0 commit comments

Comments
 (0)