-
Notifications
You must be signed in to change notification settings - Fork 16.3k
fix: default to system accent color on invalid user color #47660
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
Conversation
89a68f8
to
fe68bfe
Compare
Release Notes Persisted
|
I was unable to backport this PR to "36-x-y" cleanly; |
I was unable to backport this PR to "37-x-y" cleanly; |
I have automatically backported this PR to "38-x-y", please check out #47684 |
fix: default to system accent color on invalid user color"
@codebytere has manually backported this PR to "37-x-y", please check out #47800 |
Description of Change
Fixes an issue where an invalid color passed as a string to
accentColor
would result in a white accent color. This happened because ourParseCSSColor
utility falls back to white on parse failure. When a user passes an invalid string we should instead fall back to system color.This fixes that by reworking our
ParseCSSColor
utility to return an optional value and leaving it up to the callers to decide their fallback color.cc @bpasero
Checklist
npm test
passesRelease Notes
Notes: Fixes an issue where an invalid color passed as a string to
accentColor
would result in a white accent color.