Skip to content

Commit 566057b

Browse files
authored
fix(material/divider): non-text color contrast issues (#28995)
* fix(material/divider): non-text color contrast issues Fixes color contrast issues with non-text elements. Changed from outline-variant to outline colors to pass 3:1 ratio between light/dark mode backgrounds. Fixes b/291964002 * fix(material/divider): fixed demo list border color fixed border list demo color to match divider color fixes b/291964002
1 parent faf82b1 commit 566057b

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/dev-app/list/list-demo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
flex-flow: row wrap;
44

55
.mat-mdc-list-base {
6-
border: 1px solid rgba(0, 0, 0, 0.12);
6+
border: 1px solid var(--mat-divider-color);
77
width: 350px;
88
margin: 20px 20px 0 0;
99
}

src/material/core/tokens/m3/mat/_divider.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $prefix: (mat, divider);
1212
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
1313
$tokens: (
1414
width: token-utils.hardcode(1px, $exclude-hardcoded),
15-
color: map.get($systems, md-sys-color, outline-variant),
15+
color: map.get($systems, md-sys-color, outline),
1616
);
1717

1818
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);

src/material/core/tokens/m3/mat/_expansion.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $prefix: (mat, expansion);
2020
header-indicator-display: token-utils.hardcode(inline-block, $exclude-hardcoded),
2121
container-background-color: map.get($systems, md-sys-color, surface),
2222
container-text-color: map.get($systems, md-sys-color, on-surface),
23-
actions-divider-color: map.get($systems, md-sys-color, outline-variant),
23+
actions-divider-color: map.get($systems, md-sys-color, outline),
2424
header-hover-state-layer-color: sass-utils.safe-color-change(
2525
map.get($systems, md-sys-color, on-surface),
2626
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)

src/material/core/tokens/m3/mat/_stepper.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $prefix: (mat, stepper);
1414
$tokens: (
1515
(
1616
container-color: map.get($systems, md-sys-color, surface),
17-
line-color: map.get($systems, md-sys-color, outline-variant),
17+
line-color: map.get($systems, md-sys-color, outline),
1818
header-hover-state-layer-color: sass-utils.safe-color-change(
1919
map.get($systems, md-sys-color, inverse-surface),
2020
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)

src/material/core/tokens/m3/mat/_table.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $prefix: (mat, table);
2020
background-color: map.get($systems, md-sys-color, surface),
2121
header-headline-color: map.get($systems, md-sys-color, on-surface),
2222
row-item-label-text-color: map.get($systems, md-sys-color, on-surface),
23-
row-item-outline-color: map.get($systems, md-sys-color, outline-variant),
23+
row-item-outline-color: map.get($systems, md-sys-color, outline),
2424
),
2525
);
2626

0 commit comments

Comments
 (0)