Skip to content

Commit 762b75d

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 872952e commit 762b75d

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
@@ -62,7 +62,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;
6262
}
6363
}
6464

65-
:not(.mat-calendar-body-disabled):hover,
65+
.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
6666
.cdk-keyboard-focused .mat-calendar-body-active,
6767
.cdk-program-focused .mat-calendar-body-active {
6868
& > .mat-calendar-body-cell-content:not(.mat-calendar-body-selected) {

0 commit comments

Comments
 (0)