Skip to content

Commit

Permalink
fix: Tooltip pops up above task description in short mode (#1735)
Browse files Browse the repository at this point in the history
Tooltip used to have `mod-right` animation which block the task text in
short mode.

Fixes #1147
  • Loading branch information
HynDuf committed Mar 9, 2023
1 parent badf4c8 commit 2c329f6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/TaskLineRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function addTooltip({
}): void {
element.addEventListener('mouseenter', () => {
const tooltip = element.createDiv();
tooltip.addClasses(['tooltip', 'mod-right']);
tooltip.addClasses(['tooltip', 'pop-up']);

if (task.recurrence) {
const recurrenceDiv = tooltip.createDiv();
Expand Down
23 changes: 23 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@
padding-left: 20px;
}

/* Tooltip pop up above the description in short mode */
.tooltip.pop-up {
animation: pop-up-animation 200ms forwards ease-in-out;
}
@keyframes pop-up-animation {
0% {
opacity: 0;
transform: translateY(-100%) scale(1);
}
20% {
opacity: 0.7;
transform: translateY(-100%) scale(1.02);
}
40% {
opacity: 1;
transform: translateY(-100%) scale(1.05);
}
100% {
opacity: 1;
transform: translateY(-100%) scale(1);
}
}

/* Pencil icon. */
.tasks-edit {
background-color: var(--text-faint);
Expand Down

0 comments on commit 2c329f6

Please sign in to comment.