From 0867f3ff1c540caac06abf0595c585eb703ce425 Mon Sep 17 00:00:00 2001 From: keyan Date: Mon, 7 Aug 2023 09:29:47 -0500 Subject: [PATCH] only outline eldest new comment ... unset on touch --- components/comment.js | 3 ++- styles/globals.scss | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/comment.js b/components/comment.js index 7097be8b..a016ca97 100644 --- a/components/comment.js +++ b/components/comment.js @@ -135,7 +135,8 @@ export default function Comment ({ return (
ref.current.classList.remove('outline-new-comment')} + onMouseEnter={() => ref.current.classList.add('outline-new-comment-unset')} + onTouchStart={() => ref.current.classList.add('outline-new-comment-unset')} >
{item.meDontLike diff --git a/styles/globals.scss b/styles/globals.scss index 8b50fa52..94fdac1c 100644 --- a/styles/globals.scss +++ b/styles/globals.scss @@ -689,7 +689,15 @@ div[contenteditable]:focus, } .outline-new-comment { - box-shadow: inset 0 0 1px 1px rgba(0, 123, 190, 0.35); + box-shadow: inset 0 0 1px 1px rgba(0, 123, 190, 0.25); +} + +.outline-new-comment.outline-new-comment-unset { + box-shadow: none; +} + +.outline-new-comment .outline-new-comment { + box-shadow: none; } @keyframes spin {