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 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. @use 'sass:math';
  2. .reactions-menu {
  3. width: 280px;
  4. background: #292929;
  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. }
  44. }
  45. .reactions-row {
  46. .toolbox-button {
  47. margin-right: 8px;
  48. touch-action: manipulation;
  49. }
  50. .toolbox-button:last-of-type {
  51. margin-right: 0;
  52. }
  53. }
  54. .raise-hand-row {
  55. margin-top: 16px;
  56. .toolbox-button {
  57. width: 100%;
  58. }
  59. .toolbox-icon {
  60. width: 100%;
  61. flex-direction: row;
  62. align-items: center;
  63. span.text {
  64. font-style: normal;
  65. font-weight: 600;
  66. font-size: 14px;
  67. line-height: 24px;
  68. margin-left: 8px;
  69. }
  70. }
  71. }
  72. }
  73. .reactions-animations-container {
  74. position: absolute;
  75. width: 20%;
  76. bottom: 0;
  77. left: 40%;
  78. height: 48px;
  79. }
  80. .reactions-menu-popup-container,
  81. .reactions-menu-popup {
  82. display: inline-block;
  83. position: relative;
  84. }
  85. $reactionCount: 20;
  86. @function random($min, $max) {
  87. @return math.random() * ($max - $min) + $min;
  88. }
  89. .reaction-emoji {
  90. position: absolute;
  91. font-size: 24px;
  92. line-height: 32px;
  93. width: 32px;
  94. height: 32px;
  95. top: 32px;
  96. left: 10px;
  97. opacity: 0;
  98. z-index: 1;
  99. &.reaction-0 {
  100. animation: flowToRight 5s forwards ease-in-out;
  101. }
  102. @for $i from 1 through $reactionCount {
  103. &.reaction-#{$i} {
  104. animation: animation-#{$i} 5s forwards ease-in-out;
  105. top: #{random(50, 0)}px;
  106. left: #{random(-10, 10)}px;
  107. }
  108. }
  109. }
  110. @keyframes flowToRight {
  111. 0% {
  112. transform: translate(0px, 0px) scale(0.6);
  113. opacity: 1;
  114. }
  115. 70% {
  116. transform: translate(40px, -70vh) scale(1.5);
  117. opacity: 1;
  118. }
  119. 75% {
  120. transform: translate(40px, -70vh) scale(1.5);
  121. opacity: 1;
  122. }
  123. 100% {
  124. transform: translate(140px, -50vh) scale(1);
  125. opacity: 0;
  126. }
  127. }
  128. @mixin animation-list {
  129. @for $i from 1 through $reactionCount {
  130. $topX: random(-100, 100);
  131. $topY: random(65, 75);
  132. $bottomX: random(150, 200);
  133. $bottomY: random(40, 50);
  134. @if $topX < 0 {
  135. $bottomX: -$bottomX;
  136. }
  137. @keyframes animation-#{$i} {
  138. 0% {
  139. transform: translate(0, 0) scale(0.6);
  140. opacity: 1;
  141. }
  142. 70% {
  143. transform: translate(#{$topX}px, -#{$topY}vh) scale(1.5);
  144. opacity: 1;
  145. }
  146. 75% {
  147. transform: translate(#{$topX}px, -#{$topY}vh) scale(1.5);
  148. opacity: 1;
  149. }
  150. 100% {
  151. transform: translate(#{$bottomX}px, -#{$bottomY}vh) scale(1);
  152. opacity: 0;
  153. }
  154. }
  155. }
  156. }
  157. @include animation-list;