-
Notifications
You must be signed in to change notification settings - Fork 54
Update control
knob border-color values
#1239
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
🦋 Changeset detectedLatest commit: 0250069 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
...version for `@primer/primitives` in changeset.
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.
Pull Request Overview
This PR updates the control
knob border-color values to align with the design decision to only offer high contrast borders within high contrast themes. The change ensures that default themes use regular border colors while high contrast themes maintain emphasized borders for better accessibility.
- Changed default border-color from
emphasis
torest
for regular themes - Added explicit
emphasis
border-color overrides for all high contrast theme variants - Maintained consistency across light and dark high contrast themes including colorblind-friendly variants
'dark-dimmed-high-contrast': '{control.borderColor.emphasis}', | ||
'light-high-contrast': '{control.borderColor.emphasis}', | ||
'light-tritanopia-high-contrast': '{control.borderColor.emphasis}', | ||
'light-protanopia-deuteranopia-high-contrast': '{control.borderColor.emphasis}', | ||
'dark-high-contrast': '{control.borderColor.emphasis}', | ||
'dark-tritanopia-high-contrast': '{control.borderColor.emphasis}', | ||
'dark-protanopia-deuteranopia-high-contrast': '{control.borderColor.emphasis}', |
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.
[nitpick] The high contrast theme overrides could be organized alphabetically for better maintainability. Consider grouping light themes first, then dark themes, and within each group sort alphabetically.
'dark-dimmed-high-contrast': '{control.borderColor.emphasis}', | |
'light-high-contrast': '{control.borderColor.emphasis}', | |
'light-tritanopia-high-contrast': '{control.borderColor.emphasis}', | |
'light-protanopia-deuteranopia-high-contrast': '{control.borderColor.emphasis}', | |
'dark-high-contrast': '{control.borderColor.emphasis}', | |
'dark-tritanopia-high-contrast': '{control.borderColor.emphasis}', | |
'dark-protanopia-deuteranopia-high-contrast': '{control.borderColor.emphasis}', | |
'light-high-contrast': '{control.borderColor.emphasis}', | |
'light-protanopia-deuteranopia-high-contrast': '{control.borderColor.emphasis}', | |
'light-tritanopia-high-contrast': '{control.borderColor.emphasis}', | |
'dark-dimmed-high-contrast': '{control.borderColor.emphasis}', | |
'dark-high-contrast': '{control.borderColor.emphasis}', | |
'dark-protanopia-deuteranopia-high-contrast': '{control.borderColor.emphasis}', | |
'dark-tritanopia-high-contrast': '{control.borderColor.emphasis}', |
Copilot uses AI. Check for mistakes.
Design Token Diff (CSS)
|
Design Token Diff (StyleLint)
|
Design Token Diff (Figma)
|
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.
@langermank I think the toggle does not look that great because the knob border and outside border is the same.
I think we could either make it look like segmented control and have the border overlap the outside border. Or we could remove it entirely and have no border. But this way looks a big buggy to me.
The other components look great.
Nevermind, if you look at it at 100% and not zoomed in, this is not really noticable.
Closes https://github.com/github/primer/issues/5466
Updates the
knob
border-color to align with our decision to only offer high contrast borders within high contrast themes.