-
Notifications
You must be signed in to change notification settings - Fork 598
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
ActionList: Fix leaky disabled description styles #4566
Conversation
🦋 Changeset detectedLatest commit: e995bb9 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 📦
|
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.
// huh why?
😄
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.
@siddharthkp wanted to ask if this is possible to capture in VRT or nah? (Or is it already?)
Maybe but not a clean one. The instance where this happens in gh/gh is also not the best use case for ActionList |
* replace leaky & with data-component * Create stupid-stingrays-sparkle.md
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/false |
Problem
Description in a disabled item should not have
color: fg.muted
but the disabled color. We set this by adding the disabled color on the item and addingcolor:inherit
on the description. SourceThis feels safe because we are only targeting
Description
insideli[aria-disabled=true]
. This is the generated css:The trouble here is that the generated className for '&' is not the className just for
ActionList.Description
but is passed to multiple elements withinActionList.Item
. 🤔This really threw me off!
Solution
As a quick fix, I added a
data-component
to make the selector more specific. Expecting no visual changes, only changes in the generated css.Rollout strategy
Testing & Reviewing
Merge checklist