chat.css 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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. text-decoration: underline;
  120. text-underline-offset: 3px;
  121. text-decoration-color: rgba(255, 255, 255, 0.25);
  122. color: #fff;
  123. transition: color .2s;
  124. }
  125. .message-text img {
  126. display: inline;
  127. padding-left: 0 0.25rem;
  128. }
  129. .message-text .emoji {
  130. position: relative;
  131. top: -5px;
  132. width: 3rem;
  133. padding: 0.25rem;
  134. }
  135. .message-text code {
  136. font-family: monospace;
  137. background-color: darkslategrey;
  138. padding: 0.25rem;
  139. }
  140. .message-text .chat-embed {
  141. width: 100%;
  142. border-radius: 0.25rem;
  143. }
  144. .message-text .instagram-embed {
  145. height: 24rem;
  146. }
  147. .message-text .embedded-image {
  148. width: 100%;
  149. display: block;
  150. /* height: 15rem; */
  151. }
  152. .message-text ul li {
  153. list-style: disc;
  154. list-style-position: outside;
  155. margin-left: 1.5rem;
  156. }
  157. /* MESSAGE TEXT CONTENT */
  158. /* MESSAGE TEXT CONTENT */
  159. /* MESSAGE TEXT CONTENT */
  160. /* MESSAGE TEXT CONTENT */
  161. /* MODERATOR STYLES */
  162. /* MODERATOR STYLES */
  163. /* MODERATOR STYLES */
  164. .moderator-flag {
  165. display: inline-block;
  166. margin-right: .5rem;
  167. margin-top: -1px;
  168. vertical-align: middle;
  169. height: 1.5rem;
  170. }
  171. .user-icon-flag {
  172. display: inline-block;
  173. margin-right: .5rem;
  174. vertical-align: middle;
  175. height: 0.8rem;
  176. }
  177. .moderator-actions-group {
  178. position: absolute;
  179. top: 0;
  180. right: 0;
  181. }
  182. .message.moderatable .moderator-actions-group {
  183. opacity: 0;
  184. }
  185. .message.moderatable:hover .moderator-actions-group {
  186. opacity: 1;
  187. }
  188. .message.moderator-menu-open .moderator-actions-group {
  189. opacity: 1;
  190. }
  191. .message.moderatable:focus-within .moderator-actions-group {
  192. opacity: 1;
  193. }
  194. .moderator-menu-button {
  195. padding: .15rem;
  196. height: 1.75rem;
  197. width: 1.75rem;
  198. border-radius: 50%;
  199. text-align: center;
  200. margin-left: .05rem;
  201. font-size: 1rem;
  202. border: 1px solid transparent;
  203. opacity: .5;
  204. }
  205. .moderator-menu-button:hover {
  206. background-color: rgba(0,0,0,.5);
  207. opacity: 1;
  208. }
  209. .moderator-menu-button:focus {
  210. border-color: white;
  211. opacity: 1;
  212. }
  213. .moderator-action {
  214. padding: .15rem;
  215. height: 1.5rem;
  216. width: 1.5rem;
  217. border-radius: 50%;
  218. text-align: center;
  219. margin-left: .05rem;
  220. font-size: 1rem;
  221. }
  222. .message button:focus,
  223. .message button:active {
  224. outline: none;
  225. }
  226. .message.moderatable:last-of-type .moderator-actions-menu,
  227. .moderator-actions-menu {
  228. position: absolute;
  229. bottom: 0;
  230. right: .5rem;
  231. z-index: 999;
  232. }
  233. .message.moderatable:first-of-type .moderator-actions-menu,
  234. .message.moderatable:nth-of-type(2) .moderator-actions-menu,
  235. .message.moderatable:first-of-type .moderator-more-info-container,
  236. .message.moderatable:nth-of-type(2) .moderator-more-info-container {
  237. top: 0;
  238. bottom: unset;
  239. }
  240. .message-author {
  241. display: flex;
  242. height: 20px;
  243. align-items: center;
  244. }
  245. .message-author .flair {
  246. height: 70%;
  247. margin-right: 5px;
  248. margin-top: 1px;
  249. }
  250. .moderator-menu-item {
  251. font-size: .875rem;
  252. position: relative;
  253. border: 1px solid transparent;
  254. }
  255. .moderator-menu-item:focus {
  256. border: 1px solid white;
  257. }
  258. .moderator-menu-item .moderator-menu-icon {
  259. height: 1.5rem;
  260. width: 1.5rem;
  261. font-size: 1.5em;
  262. vertical-align: text-bottom;
  263. display: inline-block;
  264. }
  265. .moderator-menu-item .menu-icon-hover {
  266. display: none;
  267. z-index: 2;
  268. }
  269. .moderator-menu-item:hover .menu-icon-base {
  270. display: none;
  271. }
  272. .moderator-menu-item:hover .menu-icon-hover {
  273. display: inline-block;
  274. }
  275. .moderator-more-info-container {
  276. position: absolute;
  277. bottom: 0;
  278. right: 0;
  279. z-index: 5;
  280. width: calc(var(--right-col-width) - 2rem);
  281. }
  282. .moderator-more-info-message {
  283. overflow-y: auto;
  284. max-height: 6em;
  285. padding: .75rem;
  286. }
  287. .moderator-more-info-message .text-sm img {
  288. display: inline-block;
  289. width: 2rem;
  290. }
  291. @media screen and (max-width: 729px) {
  292. .moderator-more-info-container {
  293. width: auto;
  294. }
  295. }
  296. /* MODERATOR STYLES */
  297. /* MODERATOR STYLES */
  298. /* MODERATOR STYLES */
  299. .action-icon {
  300. bottom: -5px;
  301. right: -2px;
  302. animation: spin 0.4s ease 1.0;
  303. animation-fill-mode: forwards;
  304. background-color: white;
  305. background-size: cover;
  306. }
  307. .federated-action {
  308. min-height: 76px;
  309. }