Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit eff7b46

Browse files
Brandon Diamondcopybara-github
authored andcommitted
fix(list): ensure divider appears in IE high contrast mode.
PiperOrigin-RevId: 344141750
1 parent 9083b7d commit eff7b46

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

packages/mdc-list/_evolution-mixins.scss

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
$query
5050
);
5151

52+
@include _high-contrast-mode($query);
53+
5254
.mdc-evolution-list {
5355
@include _evolution-list-base($query: $query);
5456
}
@@ -839,7 +841,7 @@
839841

840842
.mdc-evolution-list-item__primary-text {
841843
@include feature-targeting.targets($feat-color) {
842-
@include theme.prop(color, $color);
844+
@include theme.property(color, $color);
843845
}
844846
}
845847
}
@@ -852,7 +854,7 @@
852854

853855
.mdc-evolution-list-item__secondary-text {
854856
@include feature-targeting.targets($feat-color) {
855-
@include theme.prop(color, $color);
857+
@include theme.property(color, $color);
856858
}
857859
}
858860
}
@@ -866,7 +868,7 @@
866868
.mdc-evolution-list-item--with-trailing-meta {
867869
.mdc-evolution-list-item__end {
868870
@include feature-targeting.targets($feat-color) {
869-
@include theme.prop(color, $color);
871+
@include theme.property(color, $color);
870872
}
871873
}
872874
}
@@ -878,7 +880,7 @@
878880
.mdc-evolution-list-item--with-leading-icon .mdc-evolution-list-item__start,
879881
.mdc-evolution-list-item--with-trailing-icon .mdc-evolution-list-item__end {
880882
@include feature-targeting.targets($feat-color) {
881-
@include theme.prop(color, $color);
883+
@include theme.property(color, $color);
882884
}
883885
}
884886
}
@@ -889,7 +891,7 @@
889891
.mdc-evolution-list-item--with-leading-icon .mdc-evolution-list-item__start,
890892
.mdc-evolution-list-item--with-trailing-icon .mdc-evolution-list-item__end {
891893
@include feature-targeting.targets($feat-color) {
892-
@include theme.prop(background-color, $color);
894+
@include theme.property(background-color, $color);
893895
}
894896
}
895897
}
@@ -950,7 +952,7 @@
950952

951953
.mdc-list-group__subheader {
952954
@include feature-targeting.targets($feat-color) {
953-
@include theme.prop(color, $color);
955+
@include theme.property(color, $color);
954956
}
955957
}
956958
}
@@ -960,7 +962,7 @@
960962

961963
.mdc-evolution-list-divider {
962964
@include feature-targeting.targets($feat-color) {
963-
@include theme.prop(background-color, $color);
965+
@include theme.property(background-color, $color);
964966
}
965967
}
966968
}
@@ -1287,7 +1289,7 @@
12871289
&.mdc-evolution-list-item--with-trailing-meta {
12881290
.mdc-evolution-list-item__end {
12891291
@include feature-targeting.targets($feat-color) {
1290-
@include theme.prop(color, $color);
1292+
@include theme.property(color, $color);
12911293
}
12921294
}
12931295
}
@@ -1303,7 +1305,7 @@
13031305
&.mdc-evolution-list-item--with-leading-icon {
13041306
.mdc-evolution-list-item__start {
13051307
@include feature-targeting.targets($feat-color) {
1306-
@include theme.prop(color, $color);
1308+
@include theme.property(color, $color);
13071309
}
13081310
}
13091311
}
@@ -1312,9 +1314,30 @@
13121314
&.mdc-evolution-list-item--with-trailing-icon {
13131315
.mdc-evolution-list-item__end {
13141316
@include feature-targeting.targets($feat-color) {
1315-
@include theme.prop(color, $color);
1317+
@include theme.property(color, $color);
13161318
}
13171319
}
13181320
}
13191321
}
13201322
}
1323+
1324+
@mixin _high-contrast-mode($query: feature-targeting.all()) {
1325+
$feat-structure: feature-targeting.create-target($query, structure);
1326+
$feat-color: feature-targeting.create-target($query, color);
1327+
1328+
@include dom-mixins.ie-high-contrast-mode {
1329+
.mdc-evolution-list-divider::after {
1330+
@include feature-targeting.targets($feat-structure) {
1331+
content: '';
1332+
display: block;
1333+
border-bottom-width: 1px;
1334+
border-bottom-style: solid;
1335+
}
1336+
1337+
@include feature-targeting.targets($feat-color) {
1338+
// Color ensures border is shown, but will be overridden by the browser.
1339+
@include theme.property(border-bottom-color, white);
1340+
}
1341+
}
1342+
}
1343+
}

0 commit comments

Comments
 (0)