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.

261 lines
4.3 KiB

  1. .emoji-mart {
  2. font-size: 13px;
  3. display: inline-block;
  4. color: $inverted-text-color;
  5. &,
  6. * {
  7. box-sizing: border-box;
  8. line-height: 1.15;
  9. }
  10. .emoji-mart-emoji {
  11. padding: 6px;
  12. }
  13. }
  14. .emoji-mart-bar {
  15. border: 0 solid darken($ui-secondary-color, 8%);
  16. &:first-child {
  17. border-bottom-width: 1px;
  18. border-top-left-radius: 5px;
  19. border-top-right-radius: 5px;
  20. background: $ui-secondary-color;
  21. }
  22. &:last-child {
  23. border-top-width: 1px;
  24. border-bottom-left-radius: 5px;
  25. border-bottom-right-radius: 5px;
  26. display: none;
  27. }
  28. }
  29. .emoji-mart-anchors {
  30. display: flex;
  31. justify-content: space-between;
  32. padding: 0 6px;
  33. color: $lighter-text-color;
  34. line-height: 0;
  35. }
  36. .emoji-mart-anchor {
  37. position: relative;
  38. flex: 1;
  39. text-align: center;
  40. padding: 12px 4px;
  41. overflow: hidden;
  42. transition: color 0.1s ease-out;
  43. cursor: pointer;
  44. background: transparent;
  45. border: 0;
  46. &:hover {
  47. color: darken($lighter-text-color, 4%);
  48. }
  49. }
  50. .emoji-mart-anchor-selected {
  51. color: $highlight-text-color;
  52. &:hover {
  53. color: darken($highlight-text-color, 4%);
  54. }
  55. .emoji-mart-anchor-bar {
  56. bottom: -1px;
  57. }
  58. }
  59. .emoji-mart-anchor-bar {
  60. position: absolute;
  61. bottom: -5px;
  62. left: 0;
  63. width: 100%;
  64. height: 4px;
  65. background-color: $highlight-text-color;
  66. }
  67. .emoji-mart-anchors {
  68. i {
  69. display: inline-block;
  70. width: 100%;
  71. max-width: 22px;
  72. }
  73. svg {
  74. fill: currentColor;
  75. max-height: 18px;
  76. }
  77. }
  78. .emoji-mart-scroll {
  79. overflow-y: scroll;
  80. height: 270px;
  81. max-height: 35vh;
  82. padding: 0 6px 6px;
  83. background: $simple-background-color;
  84. will-change: transform;
  85. &::-webkit-scrollbar-track:hover,
  86. &::-webkit-scrollbar-track:active {
  87. background-color: rgba($base-overlay-background, 0.3);
  88. }
  89. }
  90. .emoji-mart-search {
  91. padding: 10px;
  92. padding-right: 45px;
  93. background: $simple-background-color;
  94. position: relative;
  95. input {
  96. font-size: 16px;
  97. font-weight: 400;
  98. padding: 7px 9px;
  99. padding-right: 25px;
  100. font-family: inherit;
  101. display: block;
  102. width: 100%;
  103. background: rgba($ui-secondary-color, 0.3);
  104. color: $inverted-text-color;
  105. border: 1px solid $ui-secondary-color;
  106. border-radius: 4px;
  107. &::-moz-focus-inner {
  108. border: 0;
  109. }
  110. &::-moz-focus-inner,
  111. &:focus,
  112. &:active {
  113. outline: 0 !important;
  114. }
  115. &::-webkit-search-cancel-button {
  116. display: none;
  117. }
  118. }
  119. }
  120. .emoji-mart-search-icon {
  121. position: absolute;
  122. top: 18px;
  123. right: 45px + 5px;
  124. z-index: 2;
  125. padding: 2px 5px 1px;
  126. border: 0;
  127. background: none;
  128. transition: all 100ms linear;
  129. transition-property: opacity;
  130. pointer-events: auto;
  131. opacity: 0.7;
  132. &:disabled {
  133. cursor: default;
  134. pointer-events: none;
  135. opacity: 0.3;
  136. }
  137. svg {
  138. fill: $action-button-color;
  139. }
  140. }
  141. .emoji-mart-category .emoji-mart-emoji {
  142. cursor: pointer;
  143. span {
  144. z-index: 1;
  145. position: relative;
  146. text-align: center;
  147. }
  148. &:hover::before {
  149. z-index: -1;
  150. content: '';
  151. position: absolute;
  152. top: 0;
  153. left: 0;
  154. width: 100%;
  155. height: 100%;
  156. background-color: rgba($ui-secondary-color, 0.7);
  157. border-radius: 100%;
  158. }
  159. }
  160. .emoji-mart-category-label {
  161. z-index: 2;
  162. position: relative;
  163. position: -webkit-sticky;
  164. position: sticky;
  165. top: 0;
  166. span {
  167. display: block;
  168. width: 100%;
  169. font-weight: 500;
  170. padding: 5px 6px;
  171. background: $simple-background-color;
  172. }
  173. }
  174. /* For screenreaders only, via https://stackoverflow.com/a/19758620 */
  175. .emoji-mart-sr-only {
  176. position: absolute;
  177. width: 1px;
  178. height: 1px;
  179. padding: 0;
  180. margin: -1px;
  181. overflow: hidden;
  182. clip: rect(0, 0, 0, 0);
  183. border: 0;
  184. }
  185. .emoji-mart-category-list {
  186. margin: 0;
  187. padding: 0;
  188. }
  189. .emoji-mart-category-list li {
  190. list-style: none;
  191. margin: 0;
  192. padding: 0;
  193. display: inline-block;
  194. }
  195. .emoji-mart-emoji {
  196. position: relative;
  197. display: inline-block;
  198. background: transparent;
  199. border: 0;
  200. padding: 0;
  201. font-size: 0;
  202. span {
  203. width: 22px;
  204. height: 22px;
  205. }
  206. }
  207. .emoji-mart-no-results {
  208. font-size: 14px;
  209. color: $light-text-color;
  210. text-align: center;
  211. padding: 5px 6px;
  212. padding-top: 70px;
  213. .emoji-mart-no-results-label {
  214. margin-top: 0.2em;
  215. }
  216. .emoji-mart-emoji:hover::before {
  217. cursor: default;
  218. content: none;
  219. }
  220. }
  221. .emoji-mart-preview {
  222. display: none;
  223. }