Skip to content

fix(label): only thicken border on link hover, not close button#3104

Merged
bennypowers merged 3 commits intomainfrom
fix/label-link-hover-close
Apr 16, 2026
Merged

fix(label): only thicken border on link hover, not close button#3104
bennypowers merged 3 commits intomainfrom
fix/label-link-hover-close

Conversation

@bennypowers
Copy link
Copy Markdown
Member

@bennypowers bennypowers commented Apr 16, 2026

Summary

Use #container:has(#link:hover) instead of :host(:hover) so the
border only thickens when hovering the link text, not the close button.
Matches PFv4 behavior per @adamjohnson's review on #3095.

Test plan

Use #container:has(#link:hover) instead of :host(:hover) so the
border only thickens when hovering the link text itself, not when
hovering the close button. Matches PFv4 behavior.

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 16, 2026

⚠️ No Changeset found

Latest commit: 8d15bf3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@bennypowers bennypowers requested a review from adamjohnson April 16, 2026 14:11
@bennypowers bennypowers enabled auto-merge (squash) April 16, 2026 14:11
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 16, 2026

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit 8d15bf3
🔍 Latest deploy log https://app.netlify.com/projects/patternfly-elements/deploys/69e10850ad528a0008d993d6
😎 Deploy Preview https://deploy-preview-3104--patternfly-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

✅ Commitlint tests passed!

More Info
{
  "valid": true,
  "errors": [],
  "warnings": [],
  "input": "fix(label): only thicken border on link hover, not close button"
}

@bennypowers bennypowers requested a review from markcaron April 16, 2026 14:13
@github-actions github-actions bot added the AT passed Automated testing has passed label Apr 16, 2026
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

@adamjohnson adamjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's what the focus state looks like in PF Label:

pf-label with close button focused, focus state intact

And here's what it looks like in PFE Label:

pfe label with focus border being cut off by overflow hidden

The focus outline is getting cut off. This can be fixed by removing overflow: hidden; on the #container. That said, there may be other side effects to removing that.

More or less, this LGTM and, if you deem it fit, removing the overflow: hidden; is a nice add.

Replace overflow: hidden with overflow: clip and overflow-clip-margin
so focus outlines on the close button are not clipped.

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bennypowers bennypowers requested a review from adamjohnson April 16, 2026 15:52
@github-actions
Copy link
Copy Markdown
Contributor

SSR Test Run for 46d989b: Report

Comment thread elements/pf-label/pf-label.css Outdated
@github-actions
Copy link
Copy Markdown
Contributor

SSR Test Run for 9d09b3e: Report

Copy link
Copy Markdown
Collaborator

@adamjohnson adamjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Links Get Tactile Markers

@bennypowers bennypowers merged commit 7df4d6e into main Apr 16, 2026
14 of 15 checks passed
@bennypowers bennypowers deleted the fix/label-link-hover-close branch April 16, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AT passed Automated testing has passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants