Skip to content
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

fix: Tooltip pop up above the description of task in short mode #1735

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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