-
-
Notifications
You must be signed in to change notification settings - Fork 275
fix: add clip-path prevents the clickable area of the last link from expanding below the table
#1597
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
Merged
Merged
fix: add clip-path prevents the clickable area of the last link from expanding below the table
#1597
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🌐 Web query:
Safari clip-path inset(0) tr border paint artifacts workaround transform💡 Result:
Safari/WebKit can show 1px “border/edge” paint artifacts when an element is clipped (e.g.,
clip-path: inset(0)) and/or promoted to a composited layer bytransform(ortranslateZ(0)). Common workarounds:1) Don’t put the border on the clipped element (use a wrapper)
This avoids Safari having to anti-alias the border and the clip edge in the same layer (a frequent source of seams).
2) Force WebKit to clip against the box explicitly (
border-box/content-box)border-box/content-boxare validclip-pathgeometry-box values. [4]This has been cited as a workaround for WebKit clipping issues when transforms/compositing are involved. [1][2]
3) Add a “transparent outline” (often kills the 1px seam during transforms)
This is a known Safari artifact workaround for flickering/jagged 1px lines on transformed/scaled elements. [3]
If you share a minimal HTML/CSS repro (especially whether the border is on the same element as the
clip-path, and which transforms are applied), I can suggest the smallest combination that fixes it for your case.Sources: WebKit bug discussion/workaround (
clip-path: border-box) [1], Safari clipping workaround usingclip-path: content-box[2], Safari 1px line artifact workaround (outline: 1px solid transparent) [3], MDNclip-pathgeometry-box values [4].🌐 Web query:
mtsknn.fi relative tr Safari clip-path inset(0) workaround💡 Result:
Safari ignores
position: relativeon<tr>, so absolutely-positioned overlays (e.g., an<a>::after { inset: 0; position: absolute; }“make whole row clickable” trick) can expand to the viewport/table instead of the row.Workaround (from mtsknn.fi): use a transform to create the containing block, then clip the row. Also move focus styling to the row because
clip-pathcan clip outlines. [1]Note:
clip-path: inset(0)may cause Safari paint quirks (e.g., borders sometimes disappearing). [1]Sources: [1]
Verify Safari border rendering with
clip-path: inset(0)on<tr>; considertranslate(0)as a more conservative transform.The
clip-path: inset(0)on<tr>is a documented Safari workaround (per mtsknn.fi) for creating a containing block whenposition: relativeis ignored. The established pattern pairs it with atransform, and the code does applyscale-100(which generatestransform: scaleX(1) scaleY(1)). However, the mtsknn.fi source specifically recommendstransform: translate(0), which is more minimal. Both create a stacking context, but if paint artefacts (such as borders disappearing) appear in Safari, consider replacingscale-100withtranslate(0)as the tested alternative. A quick visual smoke-test in Safari would confirm whether theborder-b border-borderon table rows renders correctly.