chat.css 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. /* some base styles for chat and messaging components */
  2. :root {
  3. /* Override this in your custom CSS to change the
  4. opacity of the message backgrounds. */
  5. --message-background-alpha: 0.3;
  6. }
  7. #chat-container {
  8. position: fixed;
  9. z-index: 9;
  10. bottom: 0;
  11. right: 0;
  12. width: var(--right-col-width);
  13. height: calc(100vh - var(--header-height));
  14. }
  15. @media screen and (max-width: 729px) {
  16. #chat-container {
  17. top: var(--header-height);
  18. }
  19. }
  20. #message-input-container {
  21. width: var(--right-col-width);
  22. }
  23. #message-input-wrap {
  24. min-height: 2.5rem;
  25. max-height: 5rem;
  26. }
  27. #message-form-actions {
  28. right: 1rem;
  29. bottom: 1.88rem;
  30. }
  31. #emoji-button {
  32. height: 1.75rem;
  33. width: 1.75rem;
  34. }
  35. #message-form-warning {
  36. display: none;
  37. }
  38. .display-count #message-form-warning {
  39. display: block;
  40. }
  41. /******************************/
  42. /******************************/
  43. #message-input img {
  44. display: inline;
  45. vertical-align: middle;
  46. padding: 0.25rem;
  47. }
  48. #message-input .emoji {
  49. width: 2.2rem;
  50. padding: 0.25rem;
  51. }
  52. /* If the div is empty then show the placeholder */
  53. #message-input:empty:before {
  54. content: attr(placeholderText);
  55. pointer-events: none;
  56. display: block; /* For Firefox */
  57. color: rgba(0, 0, 0, 0.5);
  58. }
  59. /* When chat is enabled (contenteditable=true) */
  60. #message-input[contenteditable='true']:before {
  61. opacity: 1;
  62. }
  63. #message-input::selection {
  64. background: #d7ddf4;
  65. }
  66. /* When chat is disabled (contenteditable=false) chat input div should appear disabled. */
  67. #message-input:disabled,
  68. #message-input[contenteditable='false'] {
  69. opacity: 0.6;
  70. }
  71. /******************************/
  72. /******************************/
  73. /******************************/
  74. /* EMOJI PICKER OVERRIDES */
  75. .emoji-picker__wrapper {
  76. margin-top: -30px !important;
  77. }
  78. .emoji-picker.owncast {
  79. --secondary-text-color: rgba(255, 255, 255, 0.5);
  80. --category-button-color: rgba(255, 255, 255, 0.5);
  81. --hover-color: rgba(255, 255, 255, 0.25);
  82. background: rgba(26, 32, 44, 1); /* tailwind bg-gray-900 */
  83. color: rgba(226, 232, 240, 1); /* tailwind text-gray-300 */
  84. border-color: black;
  85. font-family: inherit;
  86. }
  87. .emoji-picker h2 {
  88. font-family: inherit;
  89. }
  90. .emoji-picker__emoji {
  91. border-radius: 5px;
  92. }
  93. .emoji-picker__emojis::-webkit-scrollbar {
  94. background: transparent;
  95. border-radius: 8px;
  96. }
  97. .emoji-picker__emojis::-webkit-scrollbar-track {
  98. border-radius: 8px;
  99. background-color: black;
  100. box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
  101. }
  102. .emoji-picker__emojis::-webkit-scrollbar-thumb {
  103. background-color: var(--category-button-color);
  104. border-radius: 8px;
  105. }
  106. .emoji-picker__emojis {
  107. scrollbar-color: var(--category-button-color) black;
  108. }
  109. .emoji-picker__search {
  110. color: rgba(26, 32, 44, 1);
  111. }
  112. /* MESSAGE TEXT HTML */
  113. /* MESSAGE TEXT HTML */
  114. /* MESSAGE TEXT HTML */
  115. .message-text {
  116. word-break: break-word;
  117. }
  118. .message-text a {
  119. color: #ccd;
  120. transition: color .2s;
  121. }
  122. .message-text a:hover {
  123. text-decoration: underline;
  124. color: #fff;
  125. }
  126. .message-text img {
  127. display: inline;
  128. padding-left: 0 0.25rem;
  129. }
  130. .message-text .emoji {
  131. position: relative;
  132. top: -5px;
  133. width: 3rem;
  134. padding: 0.25rem;
  135. }
  136. .message-text code {
  137. font-family: monospace;
  138. background-color: darkslategrey;
  139. padding: 0.25rem;
  140. }
  141. .message-text .chat-embed {
  142. width: 100%;
  143. border-radius: 0.25rem;
  144. }
  145. .message-text .instagram-embed {
  146. height: 24rem;
  147. }
  148. .message-text .embedded-image {
  149. width: 100%;
  150. display: block;
  151. /* height: 15rem; */
  152. }
  153. .message-text ul li {
  154. list-style: disc;
  155. list-style-position: outside;
  156. margin-left: 1.5rem;
  157. }
  158. /* MESSAGE TEXT CONTENT */
  159. /* MESSAGE TEXT CONTENT */
  160. /* MESSAGE TEXT CONTENT */
  161. /* MESSAGE TEXT CONTENT */
  162. /* MODERATOR STYLES */
  163. /* MODERATOR STYLES */
  164. /* MODERATOR STYLES */
  165. .moderator-flag:before {
  166. content: '👑'; /* this can be a path to an svg */
  167. display: inline-block;
  168. margin-right: .5rem;
  169. vertical-align: bottom;
  170. }
  171. .moderator-actions-group {
  172. position: absolute;
  173. top: 0;
  174. right: 0;
  175. }
  176. .message.moderatable .moderator-actions-group {
  177. opacity: 0;
  178. }
  179. .message.moderatable:hover .moderator-actions-group {
  180. opacity: 1;
  181. }
  182. .message.moderator-menu-open .moderator-actions-group {
  183. opacity: 1;
  184. }
  185. .message.moderatable:focus-within .moderator-actions-group {
  186. opacity: 1;
  187. }
  188. .moderator-menu-button {
  189. padding: .15rem;
  190. height: 1.75rem;
  191. width: 1.75rem;
  192. border-radius: 50%;
  193. text-align: center;
  194. margin-left: .05rem;
  195. font-size: 1rem;
  196. border: 1px solid transparent;
  197. opacity: .5;
  198. }
  199. .moderator-menu-button:hover {
  200. background-color: rgba(0,0,0,.5);
  201. opacity: 1;
  202. }
  203. .moderator-menu-button:focus {
  204. border-color: white;
  205. opacity: 1;
  206. }
  207. .moderator-action {
  208. padding: .15rem;
  209. height: 1.5rem;
  210. width: 1.5rem;
  211. border-radius: 50%;
  212. text-align: center;
  213. margin-left: .05rem;
  214. font-size: 1rem;
  215. }
  216. .message button:focus,
  217. .message button:active {
  218. outline: none;
  219. }
  220. .message.moderatable:last-of-type .moderator-actions-menu,
  221. .moderator-actions-menu {
  222. position: absolute;
  223. bottom: 0;
  224. right: .5rem;
  225. z-index: 999;
  226. }
  227. .message.moderatable:first-of-type .moderator-actions-menu,
  228. .message.moderatable:nth-of-type(2) .moderator-actions-menu,
  229. .message.moderatable:first-of-type .moderator-more-info-container,
  230. .message.moderatable:nth-of-type(2) .moderator-more-info-container {
  231. top: 0;
  232. bottom: unset;
  233. }
  234. .moderator-menu-item {
  235. font-size: .875rem;
  236. position: relative;
  237. border: 1px solid transparent;
  238. }
  239. .moderator-menu-item:focus {
  240. border: 1px solid white;
  241. }
  242. .moderator-menu-item .moderator-menu-icon {
  243. height: 1.5rem;
  244. width: 1.5rem;
  245. font-size: 1.5em;
  246. vertical-align: text-bottom;
  247. display: inline-block;
  248. }
  249. .moderator-menu-item .menu-icon-hover {
  250. display: none;
  251. z-index: 2;
  252. }
  253. .moderator-menu-item:hover .menu-icon-base {
  254. display: none;
  255. }
  256. .moderator-menu-item:hover .menu-icon-hover {
  257. display: inline-block;
  258. }
  259. .moderator-more-info-container {
  260. position: absolute;
  261. bottom: 0;
  262. right: 0;
  263. z-index: 5;
  264. width: calc(var(--right-col-width) - 2rem);
  265. }
  266. .moderator-more-info-message {
  267. overflow-y: auto;
  268. max-height: 6em;
  269. padding: .75rem;
  270. }
  271. @media screen and (max-width: 729px) {
  272. .moderator-more-info-container {
  273. width: auto;
  274. }
  275. }
  276. /* MODERATOR STYLES */
  277. /* MODERATOR STYLES */
  278. /* MODERATOR STYLES */