Skip to content

Commit 53ab3f3

Browse files
committed
fix(date-picker): fix hover/focus issues in the date-picker theme
1 parent faad118 commit 53ab3f3

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

projects/igniteui-angular/src/lib/core/styles/components/calendar/_calendar-theme.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,16 @@
382382
justify-content: space-between;
383383
margin: $cal-row-margin;
384384
padding: $cal-row-padding;
385+
386+
%cal-value {
387+
&:first-of-type {
388+
padding-left: em(8px);
389+
}
390+
391+
&:last-of-type {
392+
padding-right: em(8px);
393+
}
394+
}
385395
}
386396

387397
%cal-row-display--wrap {

projects/igniteui-angular/src/lib/core/styles/components/date-picker/_date-picker-theme.scss

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
/// @requires igx-elevation
1111
/// @requires rem
1212
@mixin igx-date-picker($theme) {
13+
$selected-hover-color: text-contrast(map-get($theme, 'date-selected-background'));
14+
1315
%date-picker {
1416
min-width: 200px;
1517
max-width: 340px;
@@ -87,15 +89,21 @@
8789

8890
%cal-value--selected {
8991
color: --var($theme, 'date-selected-text-color');
90-
background: --var($theme, 'date-selected-background') !important;
92+
// background: --var($theme, 'date-selected-background') !important;
9193
}
9294

9395
%cal-value--current {
9496
color: --var($theme, 'date-current-text-color');
9597
}
9698

9799
%cal-value--hover {
98-
background: --var($theme, 'date-hover-background');
100+
%cal-value-content::after {
101+
background: --var($theme, 'date-hover-background');
102+
}
103+
104+
&%cal-value--selected %cal-value-content::after {
105+
background: rgba($selected-hover-color, .18);
106+
}
99107
}
100108
}
101109

0 commit comments

Comments
 (0)