discourse/plugins/chat/assets/stylesheets/mobile/chat-message.scss
Joffrey JAFFEUX 6513ca69da
UX: improves chat message long press and touch (#21984)
This commit attempts to refactor our long press logic to make it more resilient and precise.

With this improvement two very UX/UI changes have been made:
- scale animation on long press
- prevents click on reaction to propagate to the message which would cause the active state of the message to trigger
2023-06-08 08:21:32 +02:00

33 lines
520 B
SCSS

.mobile-view.has-full-page-chat {
#skip-link,
.d-header,
.chat-message-actions-mobile-outlet,
.chat-channel,
.chat-thread {
> * {
@include user-select(none);
}
}
.chat-message-container {
transition: transform 400ms;
transform: scale(1);
&.is-long-pressed {
animation: scale-animation 400ms;
}
}
@keyframes scale-animation {
0% {
transform: scale(1);
}
80% {
transform: scale(0.95);
}
100% {
transform: scale(1);
}
}
}