-
Notifications
You must be signed in to change notification settings - Fork 533
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
ButtonGroup: Fix button and icon button styling when tooltips are used on them #4723
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 08df44e 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 📦
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/332533 |
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.
Looks great! I just made some suggestions to simplify the styling a little.
Just confirm that my suggestions actually work and then I'll approve.
@@ -293,6 +293,38 @@ const components = new Map([ | |||
id: 'components-buttongroup-features--icon-buttons', | |||
name: 'Icon Buttons', | |||
}, | |||
{ | |||
id: 'components-buttongroup-features--icon-buttons-with-tooltip', |
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.
Is this the new way we prefer to create VRTs? I've been manually editing the .test.ts
files 😅
display: inline-flex; | ||
vertical-align: middle; | ||
isolation: isolate; | ||
|
||
&& > * { | ||
&& :is(button, a) { |
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.
I don't actually think we need :is
for this. I think we can just select button
and a
directly
&& :is(button, a) { | |
button, | |
a { |
:focus, | ||
:active, | ||
:hover { | ||
z-index: 1; | ||
} | ||
} | ||
|
||
${sx}; | ||
&& > :first-child :is(button, a) { |
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.
Same here - I don't think we need &&
or :is
, we can just directly select button
and a
children of :first-child
&& > :first-child :is(button, a) { | |
> :first-child button, | |
> :first-child a { |
border-bottom-left-radius: ${get('radii.2')}; | ||
} | ||
|
||
&& > :last-child :is(button, a) { |
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.
One more :)
&& > :last-child :is(button, a) { | |
> :last-child button, | |
> :last-child a { |
Closes #4129
Changelog
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist