Update control knob border-color values#1239
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.
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
emphasistorestfor regular themes - Added explicit
emphasisborder-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.
[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}', |
Design Token Diff (CSS)
|
Design Token Diff (StyleLint)
|
Design Token Diff (Figma)
|
There was a problem hiding this comment.
@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
knobborder-color to align with our decision to only offer high contrast borders within high contrast themes.