You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_reactions-menu.scss 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. @use 'sass:math';
  2. .reactions-menu {
  3. width: 280px;
  4. background: $menuBG;
  5. box-shadow: 0px 3px 16px rgba(0, 0, 0, 0.6), 0px 0px 4px 1px rgba(0, 0, 0, 0.25);
  6. border-radius: 3px;
  7. padding: 16px;
  8. &.with-gif {
  9. width: 328px;
  10. .reactions-row .toolbox-button:last-of-type {
  11. top: 3px;
  12. & .toolbox-icon.toggled {
  13. background-color: #000000;
  14. }
  15. }
  16. }
  17. &.overflow {
  18. width: 100%;
  19. .toolbox-icon {
  20. width: 48px;
  21. height: 48px;
  22. span.emoji {
  23. width: 48px;
  24. height: 48px;
  25. }
  26. }
  27. .reactions-row {
  28. display: flex;
  29. flex-direction: row;
  30. justify-content: space-around;
  31. .toolbox-button {
  32. margin-right: 0;
  33. }
  34. .toolbox-button:last-of-type {
  35. top: 0;
  36. }
  37. }
  38. }
  39. .toolbox-icon {
  40. width: 40px;
  41. height: 40px;
  42. border-radius: 6px;
  43. span.emoji {
  44. width: 40px;
  45. height: 40px;
  46. font-size: 22px;
  47. display: flex;
  48. align-items: center;
  49. justify-content: center;
  50. transition: font-size ease .1s;
  51. @for $i from 1 through 12 {
  52. &.increase-#{$i}{
  53. font-size: calc(20px + #{$i}px);
  54. }
  55. }
  56. }
  57. }
  58. .reactions-row {
  59. .toolbox-button {
  60. margin-right: 8px;
  61. touch-action: manipulation;
  62. position: relative;
  63. }
  64. .toolbox-button:last-of-type {
  65. margin-right: 0;
  66. }
  67. }
  68. .raise-hand-row {
  69. margin-top: 16px;
  70. .toolbox-button {
  71. width: 100%;
  72. }
  73. .toolbox-icon {
  74. width: 100%;
  75. flex-direction: row;
  76. align-items: center;
  77. span.text {
  78. font-style: normal;
  79. font-weight: 600;
  80. font-size: 14px;
  81. line-height: 24px;
  82. margin-left: 8px;
  83. }
  84. }
  85. }
  86. }
  87. .reactions-menu-container {
  88. padding-bottom: 6px;
  89. }
  90. .reactions-animations-container {
  91. position: absolute;
  92. width: 20%;
  93. bottom: 0;
  94. left: 40%;
  95. height: 0;
  96. }
  97. .reactions-menu-popup-container {
  98. display: inline-block;
  99. position: relative;
  100. }
  101. $reactionCount: 20;
  102. @function random($min, $max) {
  103. @return math.random() * ($max - $min) + $min;
  104. }
  105. .reaction-emoji {
  106. position: absolute;
  107. font-size: 24px;
  108. line-height: 32px;
  109. width: 32px;
  110. height: 32px;
  111. top: 0;
  112. left: 20px;
  113. opacity: 0;
  114. z-index: 1;
  115. &.reaction-0 {
  116. animation: flowToRight 5s forwards ease-in-out;
  117. }
  118. @for $i from 1 through $reactionCount {
  119. &.reaction-#{$i} {
  120. animation: animation-#{$i} 5s forwards ease-in-out;
  121. top: #{random(-40, 10)}px;
  122. left: #{random(0, 30)}px;
  123. }
  124. }
  125. }
  126. @keyframes flowToRight {
  127. 0% {
  128. transform: translate(0px, 0px) scale(0.6);
  129. opacity: 1;
  130. }
  131. 70% {
  132. transform: translate(40px, -70vh) scale(1.5);
  133. opacity: 1;
  134. }
  135. 75% {
  136. transform: translate(40px, -70vh) scale(1.5);
  137. opacity: 1;
  138. }
  139. 100% {
  140. transform: translate(140px, -50vh) scale(1);
  141. opacity: 0;
  142. }
  143. }
  144. @mixin animation-list {
  145. @for $i from 1 through $reactionCount {
  146. $topX: random(-100, 100);
  147. $topY: random(65, 75);
  148. $bottomX: random(150, 200);
  149. $bottomY: random(40, 50);
  150. @if $topX < 0 {
  151. $bottomX: -$bottomX;
  152. }
  153. @keyframes animation-#{$i} {
  154. 0% {
  155. transform: translate(0, 0) scale(0.6);
  156. opacity: 1;
  157. }
  158. 70% {
  159. transform: translate(#{$topX}px, -#{$topY}vh) scale(1.5);
  160. opacity: 1;
  161. }
  162. 75% {
  163. transform: translate(#{$topX}px, -#{$topY}vh) scale(1.5);
  164. opacity: 1;
  165. }
  166. 100% {
  167. transform: translate(#{$bottomX}px, -#{$bottomY}vh) scale(1);
  168. opacity: 0;
  169. }
  170. }
  171. }
  172. }
  173. @include animation-list;