-
Notifications
You must be signed in to change notification settings - Fork 538
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
Use button
CSS vars for border-color to support a feature flag
#3861
Conversation
🦋 Changeset detectedLatest commit: 5e244b5 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 |
size-limit report 📦
|
…eact into btn-border-contrast-tes
@import '@primer/primitives/tokens-next-private/css/functional/themes/dark-dimmed.css'; | ||
@import '@primer/primitives/tokens-next-private/css/functional/themes/dark-high-contrast.css'; | ||
@import '@primer/primitives/tokens-next-private/css/functional/themes/dark-tritanopia.css'; | ||
/* temporarily disabiling these to ensure visual regression tests work on production code |
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.
do we want to keep these disabled in storybook?
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.
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.
Good idea, should we do that in a different PR though and get this one quickly?
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.
Yeah totally agree
@@ -9,11 +9,11 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme | |||
boxShadow: `${theme?.shadows.btn.shadow}, ${theme?.shadows.btn.insetShadow}`, | |||
'&:hover:not([disabled])': { | |||
backgroundColor: 'btn.hoverBg', | |||
borderColor: 'btn.hoverBorder', | |||
borderColor: `var(--button-default-borderColor-hover, ${theme?.colors.btn.hoverBorder})`, |
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.
✅ has a fallback 10/10
@@ -25,7 +25,7 @@ exports[`ActionMenu renders consistently 1`] = ` | |||
.c1 { | |||
border-radius: 6px; | |||
border: 1px solid; | |||
border-color: rgba(31,35,40,0.15); | |||
border-color: var(--button-default-borderColor-rest,rgba(31,35,40,0.15)); |
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.
✅ makes sense, ActionMenu uses Button
This comment was marked as resolved.
This comment was marked as resolved.
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.
LGTM, the snapshot changes are intentional!
This has no visual change, and is for a test in dotcom where I'm targeting these CSS variables.
Changelog
default
andoutline
border colors including a fallbackRollout strategy
Testing & Reviewing
There should be no visual changes in this PR. Check that the visual regression snapshots look normal.
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.