-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: contrast for LemonButton type=primary status=danger #27194
base: master
Are you sure you want to change the base?
Conversation
Size Change: 0 B Total Size: 9.44 MB ℹ️ View Unchanged
|
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.
I liked the reverted earlier iteration of this improvement better: https://github.com/PostHog/posthog/pull/26821/files#diff-6b9ff2616e155dbc78346bd317a521087f520ddd7766cae0750e12c073564ac5
Can we go for that style?
@Twixes agreed, so does @corywatilo (note the darkmode primary danger) |
📸 UI snapshots have been updated5 snapshot changes in total. 0 added, 5 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
Problem
Primary danger button has a low contrast ratio in light and is basically broken in darkmode with a yellow background.
Although our engineers don't use this variant, there are some instances in the code where it occurs, and instead of changing those files, let's just fix from here.
Changes (top right button is changing)
Before Light (foreground: #F54E00, background: #FFFFFF = 3.51:1 contrast ratio)
Before Dark (foreground: #F54E00, background: #E0A045 = 1.55:1 contrast ratio)
After Light (foreground: #111111, background: #F8D7CD = 14.02:1 contrast ratio)
After Dark (foreground: #111111, background: #F1AF9C = 10.2:1 contrast ratio)
Does this work well for both Cloud and self-hosted?
N/A
How did you test this code?
Storybook