Skip to content

Commit edad40f

Browse files
authored
fix(material/datepicker): revert breaking change on IE (#23786)
Reverts #23057 which accidentally introduced a breaking change for IE on the patch branch by using a `class` binding on an SVG element which requires a polyfill.
1 parent 5402a8b commit edad40f

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

src/material/datepicker/_datepicker-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ $calendar-weekday-table-font-size: 11px !default;
6767
$disabled-color: theming.get-color-from-palette($foreground, disabled-text);
6868

6969
.mat-calendar-arrow {
70-
fill: theming.get-color-from-palette($foreground, icon);
70+
border-top-color: theming.get-color-from-palette($foreground, icon);
7171
}
7272

7373
// The prev/next buttons need a bit more specificity to

src/material/datepicker/calendar-header.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
[attr.aria-describedby]="_buttonDescriptionId"
66
cdkAriaLive="polite">
77
<span [attr.id]="_buttonDescriptionId">{{periodButtonText}}</span>
8-
<svg class="mat-calendar-arrow" [class.mat-calendar-invert]="calendar.currentView !== 'month'"
9-
viewBox="0 0 10 5" focusable="false">
10-
<polygon points="0,0 5,5 10,0"/>
11-
</svg>
8+
<div class="mat-calendar-arrow"
9+
[class.mat-calendar-invert]="calendar.currentView !== 'month'"></div>
1210
</button>
1311

1412
<div class="mat-calendar-spacer"></div>

src/material/datepicker/calendar.scss

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@use '../core/style/layout-common';
2-
@use '../../cdk/a11y';
32

43
$calendar-padding: 8px !default;
54
$calendar-header-divider-width: 1px !default;
@@ -52,8 +51,12 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
5251

5352
.mat-calendar-arrow {
5453
display: inline-block;
55-
width: $calendar-arrow-size * 2;
56-
height: $calendar-arrow-size;
54+
width: 0;
55+
height: 0;
56+
border-left: $calendar-arrow-size solid transparent;
57+
border-right: $calendar-arrow-size solid transparent;
58+
border-top-width: $calendar-arrow-size;
59+
border-top-style: solid;
5760
margin: 0 0 0 $calendar-arrow-size;
5861
vertical-align: middle;
5962

@@ -64,11 +67,6 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
6467
[dir='rtl'] & {
6568
margin: 0 $calendar-arrow-size 0 0;
6669
}
67-
68-
@include a11y.high-contrast(active, off) {
69-
// Setting the fill to `currentColor` doesn't work on Chromium browsers.
70-
fill: CanvasText;
71-
}
7270
}
7371

7472
.mat-calendar-previous-button,

0 commit comments

Comments
 (0)