From 0b606370fa1f26db3abdf25e4496b657ef0a55f5 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Wed, 11 Sep 2024 14:16:00 +0200 Subject: [PATCH] fix: remove hover styles for touch devices inside the message menu (#307) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### 🎯 Goal On touch devices, you don't need special styles for hover action. However, mobile OS-es still handle the `:hover` CSS selector, but it can be confusing to the user when they accidentally activate the `:hover` selector, this PR removes the `:hover` styles for touch devices inside the message menu. ### 🛠 Implementation details _Provide a description of the implementation_ ### 🎨 UI Changes _Add relevant screenshots_ Make sure to test with both Angular and React (with both `MessageList` and `VirtualizedMessageList` components) SDKs --- .../styles/MessageActionsBox/MessageActionsBox-theme.scss | 8 ++++++++ .../MessageReactions/MessageReactionsSelector-theme.scss | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/v2/styles/MessageActionsBox/MessageActionsBox-theme.scss b/src/v2/styles/MessageActionsBox/MessageActionsBox-theme.scss index 32e81f30..21d9ff79 100644 --- a/src/v2/styles/MessageActionsBox/MessageActionsBox-theme.scss +++ b/src/v2/styles/MessageActionsBox/MessageActionsBox-theme.scss @@ -67,3 +67,11 @@ } } } + +@media (hover: none) { + .str-chat__message-actions-box { + .str-chat__message-actions-list-item-button:hover { + background-color: transparent; + } + } +} diff --git a/src/v2/styles/MessageReactions/MessageReactionsSelector-theme.scss b/src/v2/styles/MessageReactions/MessageReactionsSelector-theme.scss index ee6c73e5..1a715545 100644 --- a/src/v2/styles/MessageReactions/MessageReactionsSelector-theme.scss +++ b/src/v2/styles/MessageReactions/MessageReactionsSelector-theme.scss @@ -84,5 +84,11 @@ background-color: var(--str-chat__message-reactions-option-selected-background-color); } } + + @media (hover: none) { + .str-chat__message-reactions-option:hover { + background-color: transparent; + } + } } }