fix(inline-links): drop the trailing context-menu box from inline task links - #2303
Merged
callumalpass merged 2 commits intoSep 10, 2026
Merged
Conversation
…k links The context-menu affordance is `opacity: 0` until its card is hovered, which hides it but keeps its 14px box in layout. In the card layouts that costs nothing: it sits at the end of a row of its own, and `margin-left: auto` parks it against the edge. In `--layout-inline` it is 14px of dead space after every task link, plus the row's 4px gap, sitting in the middle of running prose. Measured on a live vault, the gap between the end of the link text and the end of the widget was 14px on links carrying the element and 0px on those without. It is removed for the inline layout rather than hidden until hover, because an invisible target inside a sentence cannot be aimed for, and the link still has its right-click menu.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The problem
Inline task links carry an odd gap after them in running prose.
The cause is
.task-card__context-menu, which isopacity: 0until its card is hovered. That hides it but keeps its box in layout:https://github.com/callumalpass/tasknotes/blob/main/styles/task-card-bem.css#L827-L839
In the card layouts this costs nothing - the element sits at the end of a row of its own, and
margin-left: autoparks it against the edge. In--layout-inlineit is 14px of dead space after every link, plus the row's 4px gap, andmargin-left: autodoes nothing inline.Measured on a live vault, walking the rendered inline widgets and taking the distance from the right edge of
.task-card__contentto the right edge of.task-card__main-row:The change
One rule, scoped to the inline layout. Card, kanban and list layouts are untouched.
Removed rather than hidden-until-hover: an invisible target inside a sentence cannot be aimed for, and the link still has its right-click menu. If you would rather keep it reachable,
position: absoluteor a zero-width box that expands on hover would also remove the space - happy to switch.