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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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-animations-container {
  88. position: absolute;
  89. width: 20%;
  90. bottom: 0;
  91. left: 40%;
  92. height: 0;
  93. }
  94. .reactions-menu-popup-container,
  95. .reactions-menu-popup {
  96. display: inline-block;
  97. position: relative;
  98. }
  99. $reactionCount: 20;
  100. @function random($min, $max) {
  101. @return math.random() * ($max - $min) + $min;
  102. }
  103. .reaction-emoji {
  104. position: absolute;
  105. font-size: 24px;
  106. line-height: 32px;
  107. width: 32px;
  108. height: 32px;
  109. top: 0;
  110. left: 20px;
  111. opacity: 0;
  112. z-index: 1;
  113. &.reaction-0 {
  114. animation: flowToRight 5s forwards ease-in-out;
  115. }
  116. @for $i from 1 through $reactionCount {
  117. &.reaction-#{$i} {
  118. animation: animation-#{$i} 5s forwards ease-in-out;
  119. top: #{random(-40, 10)}px;
  120. left: #{random(0, 30)}px;
  121. }
  122. }
  123. }
  124. @keyframes flowToRight {
  125. 0% {
  126. transform: translate(0px, 0px) scale(0.6);
  127. opacity: 1;
  128. }
  129. 70% {
  130. transform: translate(40px, -70vh) scale(1.5);
  131. opacity: 1;
  132. }
  133. 75% {
  134. transform: translate(40px, -70vh) scale(1.5);
  135. opacity: 1;
  136. }
  137. 100% {
  138. transform: translate(140px, -50vh) scale(1);
  139. opacity: 0;
  140. }
  141. }
  142. @mixin animation-list {
  143. @for $i from 1 through $reactionCount {
  144. $topX: random(-100, 100);
  145. $topY: random(65, 75);
  146. $bottomX: random(150, 200);
  147. $bottomY: random(40, 50);
  148. @if $topX < 0 {
  149. $bottomX: -$bottomX;
  150. }
  151. @keyframes animation-#{$i} {
  152. 0% {
  153. transform: translate(0, 0) scale(0.6);
  154. opacity: 1;
  155. }
  156. 70% {
  157. transform: translate(#{$topX}px, -#{$topY}vh) scale(1.5);
  158. opacity: 1;
  159. }
  160. 75% {
  161. transform: translate(#{$topX}px, -#{$topY}vh) scale(1.5);
  162. opacity: 1;
  163. }
  164. 100% {
  165. transform: translate(#{$bottomX}px, -#{$bottomY}vh) scale(1);
  166. opacity: 0;
  167. }
  168. }
  169. }
  170. }
  171. @include animation-list;