-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(material/divider): non-text color contrast issues #28995
Conversation
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
8c001cf
to
2a77bbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might just be me, but the new color seems a bit too dark. Also worth noting that the outline-variant
is according to the spec here: https://m3.material.io/components/divider/specs
Unfortunately the spec explicitly states that it does not account for contrast ratios for the divider. Whether we go with To make this a little more acceptable, can we update the list demo's outline color to match this value? It does look weird that the list outline is so much lighter than the divider |
fixed border list demo color to match divider color fixes b/291964002
Changed border color in demo list to match mat-divider color so it looks visually better |
Deployed dev-app for e65e9d9 to: https://ng-dev-previews-comp--pr-angular-components-28995-dev-nng8pkz4.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes color contrast issues with non-text elements, including divider. Changed from "outline-variant" to "outline" colors to pass 3:1 ratio between light/dark mode backgrounds. Also changing for expansion, stepper, and table so they can also pass not-text color contrast.
Before (Light mode):

FG- #c4c6d0 (neutral-variant80)
BG- #fff
Ratio: 1.70:1
Screenshot:
After (Light mode):

FG- #747775 (neutral-variant50)
BG- #fff
Ratio: 4.52:1
Screenshot:
Before (Dark mode):

FG- #44474E (neutral-variant30)
BG- #1f1f1f
Ratio: 1.77:1
Screenshot:
After (Dark mode):

FG- #8e9099 (neutral-variant60)
BG- #1f1f1f
Ratio: 5.17:1
Screenshot:
Fixes b/291964002