Skip to content

Commit

Permalink
fix(material): non-text color contrast issues
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DBowen33 committed May 2, 2024
1 parent 7136c20 commit 8c001cf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/material/core/tokens/m3/mat/_divider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $prefix: (mat, divider);
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
$tokens: (
width: token-utils.hardcode(1px, $exclude-hardcoded),
color: map.get($systems, md-sys-color, outline-variant),
color: map.get($systems, md-sys-color, outline),
);

@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
Expand Down
2 changes: 1 addition & 1 deletion src/material/core/tokens/m3/mat/_expansion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $prefix: (mat, expansion);
header-indicator-display: token-utils.hardcode(inline-block, $exclude-hardcoded),
container-background-color: map.get($systems, md-sys-color, surface),
container-text-color: map.get($systems, md-sys-color, on-surface),
actions-divider-color: map.get($systems, md-sys-color, outline-variant),
actions-divider-color: map.get($systems, md-sys-color, outline),
header-hover-state-layer-color: sass-utils.safe-color-change(
map.get($systems, md-sys-color, on-surface),
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
Expand Down
2 changes: 1 addition & 1 deletion src/material/core/tokens/m3/mat/_stepper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $prefix: (mat, stepper);
$tokens: (
(
container-color: map.get($systems, md-sys-color, surface),
line-color: map.get($systems, md-sys-color, outline-variant),
line-color: map.get($systems, md-sys-color, outline),
header-hover-state-layer-color: sass-utils.safe-color-change(
map.get($systems, md-sys-color, inverse-surface),
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
Expand Down
2 changes: 1 addition & 1 deletion src/material/core/tokens/m3/mat/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $prefix: (mat, table);
background-color: map.get($systems, md-sys-color, surface),
header-headline-color: map.get($systems, md-sys-color, on-surface),
row-item-label-text-color: map.get($systems, md-sys-color, on-surface),
row-item-outline-color: map.get($systems, md-sys-color, outline-variant),
row-item-outline-color: map.get($systems, md-sys-color, outline),
),
);

Expand Down

0 comments on commit 8c001cf

Please sign in to comment.