Adds .comment_highlighting class after scrolling to comment.
This commit is contained in:
lalentine
2020-04-11 23:03:47 -05:00
committed by Umputun
parent 2e47fde46e
commit 49dd5bdf21
3 changed files with 12 additions and 0 deletions
@@ -95,4 +95,8 @@
}
}
}
&.comment_highlighting {
background: var(--color19);
}
}
@@ -95,4 +95,8 @@
}
}
}
&.comment_highlighting {
background: var(--color4);
}
}
+4
View File
@@ -136,6 +136,10 @@ export class Root extends Component<Props, State> {
if (comment) {
setTimeout(() => {
postMessage({ scrollTo: comment.getBoundingClientRect().top });
comment.classList.add('comment_highlighting');
setTimeout(() => {
comment.classList.remove('comment_highlighting');
}, 5e3);
}, 500);
}
}