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.1KB

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