Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 2360764

Browse files
rudzikdawidtinayuangao
authored andcommitted
fix(datepicker): calendar panel theme supports dark mode (#11201)
Closes #11200
1 parent 50a1616 commit 2360764

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/components/datepicker/calendar-theme.scss

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/** Theme styles for mdCalendar. */
22

33
.md-calendar.md-THEME_NAME-theme {
4-
background: '{{background-A100}}';
5-
color: '{{background-A200-0.87}}';
4+
background: '{{background-hue-1}}';
5+
color: '{{foreground-1-0.87}}';
66

77
tr:last-child td {
8-
border-bottom-color: '{{background-200}}';
8+
border-bottom-color: '{{background-hue-2}}';
99
}
1010
}
1111
.md-THEME_NAME-theme {
1212
.md-calendar-day-header {
13-
background: '{{background-300}}';
14-
color: '{{background-A200-0.87}}';
13+
background: '{{background-500-0.32}}';
14+
color: '{{foreground-1-0.87}}';
1515
}
1616

1717
.md-calendar-date.md-calendar-date-today {
@@ -28,7 +28,7 @@
2828
.md-calendar-date-selection-indicator {
2929
.md-calendar-date.md-focus &,
3030
&:hover {
31-
background: '{{background-300}}';
31+
background: '{{background-500-0.32}}';
3232
}
3333
}
3434

@@ -44,10 +44,6 @@
4444

4545
.md-calendar-date-disabled,
4646
.md-calendar-month-label-disabled {
47-
// Note that this uses half the opacity of the default text color,
48-
// because the calendar is white, even on the dark theme, otherwise
49-
// the default disabled color `foreground-3` blends in with the
50-
// background.
51-
color: '{{background-A200-0.435}}';
47+
color: '{{foreground-3}}';
5248
}
5349
}

src/components/datepicker/datePicker-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858

5959
.md-datepicker-calendar {
60-
background: '{{background-A100}}';
60+
background: '{{background-hue-1}}';
6161
}
6262

6363
$mask-color: '{{background-hue-1}}';

0 commit comments

Comments
 (0)