mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 18:43:43 +08:00
6513ca69da
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
33 lines
520 B
SCSS
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);
|
|
}
|
|
}
|
|
}
|