-
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
Prevents text color from changing on hover for "inactive" ActionMenu.Items of the "danger" variant #4651
Conversation
🦋 Changeset detectedLatest commit: f3db868 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 |
'[data-variant="danger"]:hover &, [data-variant="danger"]:active &': { | ||
color: getVariantStyles(variant, disabled, inactive).hoverColor, | ||
}, | ||
'[data-variant="danger"]:not([aria-disabled]):not([data-inactive]):hover &, [data-variant="danger"]:active &': |
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.
The fact that these styles affect the color
of sibling nodes is kind of weird. Should we do a refactor as part of this PR? I was afraid to touch it and break things.
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.
Let's wait till we refactor to CSS modules 😂
size-limit report 📦
|
Closes #No issue created.See Slack comment (GitHub staff only).Demo of fix
The fourth item, "Make a copy", is
variant="danger"
and hasinactiveText
set. Before this change, the text color would change on hover. After this change, the text color remains the same.Before:
Kapture.2024-06-07.at.08.47.09.mp4
After:
Kapture.2024-06-07.at.08.34.08.mp4
Changelog
New
Changed
Increases specificity of the
:hover
styles to exclude inactive items.Removed
Rollout strategy
Testing & Reviewing
Try and hover the fourth item ("Make a copy") in the menu of the ActionMenu/Features/Inactive items story. VRTs should cover regressions.
Merge checklist