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.

345 lines
7.7 KiB

  1. /*
  2. * Copyright (c) 2016
  3. *
  4. * This file is licensed under the Affero General Public License version 3
  5. * or later.
  6. *
  7. * See the COPYING-README file.
  8. *
  9. */
  10. #commentsTabView .comments,
  11. #commentsTabView .emptycontent {
  12. flex-grow: 1;
  13. }
  14. #commentsTabView .emptycontent {
  15. margin-top: 0;
  16. }
  17. #commentsTabView .newCommentForm {
  18. position: relative;
  19. }
  20. #commentsTabView .newCommentForm .message {
  21. width: calc(100% - 36px);
  22. margin-left: 36px;
  23. padding-right: 30px;
  24. display: block;
  25. }
  26. #commentsTabView .newCommentForm .submit,
  27. #commentsTabView .newCommentForm .submitLoading,
  28. #commentsTabView .newCommentForm .share,
  29. #commentsTabView .newCommentForm .shareLoading {
  30. position: absolute;
  31. width: 44px;
  32. height: 44px;
  33. bottom: -4px;
  34. margin: 0;
  35. }
  36. #commentsTabView .newCommentForm .submit,
  37. #commentsTabView .newCommentForm .submitLoading {
  38. right: 0;
  39. }
  40. #commentsTabView .newCommentForm .share,
  41. #commentsTabView .newCommentForm .shareLoading {
  42. right: -44px;
  43. }
  44. #commentsTabView .newCommentForm .submit,
  45. #commentsTabView .newCommentForm .share {
  46. background-color: transparent;
  47. border: none;
  48. opacity: .3;
  49. }
  50. #commentsTabView .newCommentForm .submit:hover,
  51. #commentsTabView .newCommentForm .submit:focus,
  52. #commentsTabView .newCommentForm .share:hover,
  53. #commentsTabView .newCommentForm .share:focus {
  54. opacity: 1;
  55. }
  56. #commentsTabView .newCommentForm .cancel {
  57. margin-right: 6px;
  58. }
  59. #commentsTabView .newCommentForm div.message {
  60. resize: none;
  61. }
  62. #commentsTabView .newCommentForm div.message:empty:before {
  63. content: attr(data-placeholder);
  64. color: grey;
  65. }
  66. #commentsTabView .comment {
  67. position: relative;
  68. margin-bottom: 30px;
  69. word-wrap: break-word;
  70. overflow-wrap: break-word;
  71. }
  72. #commentsTabView .comment .avatar,
  73. .atwho-view-ul * .avatar{
  74. width: 32px;
  75. height: 32px;
  76. line-height: 32px;
  77. margin-right: 5px;
  78. }
  79. #commentsTabView .comment .message .avatar,
  80. .atwho-view-ul * .avatar
  81. {
  82. display: inline-block;
  83. }
  84. #activityTabView li.comment.collapsed .activitymessage,
  85. #commentsTabView .comment.collapsed .message {
  86. white-space: pre-wrap;
  87. }
  88. #activityTabView li.comment.collapsed .activitymessage,
  89. #commentsTabView .comment.collapsed .message {
  90. max-height: 70px;
  91. overflow: hidden;
  92. }
  93. #activityTabView li.comment .message-overlay,
  94. #commentsTabView .comment .message-overlay {
  95. display: none;
  96. }
  97. #activityTabView li.comment.collapsed .message-overlay,
  98. #commentsTabView .comment.collapsed .message-overlay {
  99. display: block;
  100. position: absolute;
  101. z-index: 2;
  102. height: 50px;
  103. pointer-events: none;
  104. left: 0;
  105. right: 0;
  106. bottom: 0;
  107. background: -moz-linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
  108. background: -webkit-linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
  109. background: -o-linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
  110. background: -ms-linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
  111. background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
  112. filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00FFFFFF', endColorstr='#FFFFFFFF');
  113. background-repeat: no-repeat;
  114. }
  115. #commentsTabView .authorRow>div {
  116. display: inline-block;
  117. vertical-align: middle;
  118. }
  119. #commentsTabView .authorRow>div.hidden {
  120. display: none !important;
  121. }
  122. .atwho-view-ul * .avatar-name-wrapper,
  123. #commentsTabView .comment .authorRow {
  124. position: relative;
  125. display: inline-flex;
  126. align-items: center;
  127. width: 100%;
  128. }
  129. body:not(#body-public) #commentsTabView .comment .authorRow:not(.currentUser):not(.guestUser) {
  130. .avatar,
  131. .avatar img,
  132. .author {
  133. cursor: pointer;
  134. }
  135. }
  136. .atwho-view-ul .avatar-name-wrapper,
  137. .atwho-view-ul .avatar-name-wrapper .avatar,
  138. .atwho-view-ul .avatar-name-wrapper .avatar img {
  139. cursor: pointer;
  140. }
  141. .atwho-view-ul * .avatar-name-wrapper {
  142. white-space: nowrap;
  143. }
  144. #commentsTabView .comment .author,
  145. #commentsTabView .comment .date {
  146. color: var(--color-text-maxcontrast);
  147. }
  148. #commentsTabView .comment .author {
  149. margin-left: 5px;
  150. }
  151. #commentsTabView .comment .date {
  152. /* "margin-left: auto" aligns the block to the right, while
  153. * "text-align: right" aligns the text inside the block to the right, for
  154. * example, when it uses two lines due to a limited width. */
  155. margin-left: auto;
  156. text-align: right;
  157. }
  158. #commentsTabView .comments li .message {
  159. padding-left: 40px;
  160. }
  161. #commentsTabView .comment .action {
  162. opacity: 0;
  163. vertical-align: middle;
  164. display: inline-block;
  165. }
  166. #commentsTabView .comment:hover .action {
  167. opacity: 0.3;
  168. }
  169. #commentsTabView .comment .action:hover {
  170. opacity: 1;
  171. }
  172. #commentsTabView .comment .action.delete {
  173. position: absolute;
  174. right: 0;
  175. }
  176. #commentsTabView .comment.disabled {
  177. opacity: 0.3;
  178. }
  179. #commentsTabView .comment.disabled .action {
  180. visibility: hidden;
  181. }
  182. #commentsTabView .message.error {
  183. color: #e9322d;
  184. border-color: #e9322d;
  185. box-shadow: 0 0 6px #f8b9b7;
  186. }
  187. .app-files .action-comment {
  188. padding: 16px 14px;
  189. }
  190. #commentsTabView .comment.grouped .authorRow {
  191. display: none;
  192. }
  193. #commentsTabView .comment.grouped {
  194. margin-top: -20px;
  195. }
  196. #commentsTabView .comment.showDate {
  197. margin-top: 40px;
  198. border-top: 1px solid #dbdbdb;
  199. padding-top: 10px;
  200. }
  201. #commentsTabView .comment.showDate:before {
  202. content: attr(data-date);
  203. position: absolute;
  204. top: 0;
  205. left: 50%;
  206. transform: translateX(-50%) translateY(-50%);
  207. padding: 0 7px 0 7px;
  208. text-align: center;
  209. color: #878787;
  210. background-color: #fff;
  211. }
  212. #commentsTabView .comment.showDate .authorRow {
  213. display: inline-flex;
  214. }
  215. #commentsTabView .comment .message .mention-user {
  216. /* Make the mention the positioning context of its child contacts menu */
  217. position: relative;
  218. display: inline;
  219. vertical-align: top;
  220. background-color: var(--color-background-dark);
  221. border-radius: 50vh;
  222. padding: 1px 7px 1px 1px;
  223. /* Ensure that the avatar and the user name will be kept together;
  224. * otherwise a line break could be added between them when the wrapper
  225. * is close to the right border of the message. */
  226. white-space: nowrap;
  227. .avatar {
  228. img {
  229. vertical-align: top;
  230. }
  231. height: 16px;
  232. width: 16px;
  233. vertical-align: middle;
  234. padding: 1px;
  235. margin-top: -3px;
  236. margin-left: 0;
  237. margin-right: 2px;
  238. }
  239. }
  240. #commentsTabView .comment:not(.systemMessage) .message .mention-user {
  241. font-weight: bold;
  242. &.currentUser {
  243. background-color: var(--color-primary);
  244. color: var(--color-primary-text);
  245. }
  246. }
  247. #commentsTabView .comment.systemMessage .message .mention-user {
  248. color: var(--color-main-text);
  249. }
  250. /* System messages have no author, so the author row only contains the date.
  251. * Instead of showing the date on its own row and the message below it the
  252. * message and the date are merged in a single row using flexboxes. */
  253. #commentsTabView .comment.systemMessage {
  254. display: flex;
  255. flex-direction: row;
  256. }
  257. #commentsTabView .comment.systemMessage .authorRow {
  258. order: 1;
  259. flex-grow: 0;
  260. width: auto;
  261. padding-left: 10px;
  262. }
  263. #commentsTabView .comment.systemMessage .message {
  264. order: 0;
  265. flex-grow: 1;
  266. color: var(--color-text-maxcontrast);
  267. }
  268. body:not(#body-public) #commentsTabView .comment:not(.newCommentRow) .message .mention-user:not(.currentUser),
  269. body:not(#body-public) #commentsTabView .comment:not(.newCommentRow) .message .mention-user:not(.currentUser) .avatar,
  270. body:not(#body-public) #commentsTabView .comment:not(.newCommentRow) .message .mention-user:not(.currentUser) .avatar img {
  271. cursor: pointer;
  272. }
  273. #commentsTabView .comment .message .contactsmenu-popover {
  274. left: -6px;
  275. top: 24px;
  276. }
  277. #commentsTabView .comment .message .filePreviewContainer .filePreview {
  278. /* The file preview can not be a block; otherwise it would fill the whole
  279. * width of the container and the loading icon would not be centered on the
  280. * image. */
  281. display: inline-block;
  282. }
  283. #commentsTabView .comment .message .filePreviewContainer strong {
  284. /* As the file preview is an inline block the name is set as a block to
  285. * force it to be on its own line below the preview. */
  286. display: block;
  287. }