comments.scss 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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 .emptycontent {
  11. margin-top: 0;
  12. }
  13. #commentsTabView .newCommentForm {
  14. margin-left: 36px;
  15. position: relative;
  16. }
  17. #commentsTabView .newCommentForm .message {
  18. width: 100%;
  19. padding: 10px;
  20. min-height: 44px;
  21. margin: 0;
  22. /* Prevent the text from overlapping with the submit button. */
  23. padding-right: 30px;
  24. }
  25. #commentsTabView .newCommentForm {
  26. .submit,
  27. .submitLoading {
  28. width: 44px;
  29. height: 44px;
  30. margin: 0;
  31. padding: 13px;
  32. background-color: transparent;
  33. border: none;
  34. opacity: .3;
  35. position: absolute;
  36. bottom: 0;
  37. right: 0;
  38. }
  39. }
  40. #commentsTabView .deleteLoading {
  41. padding: 14px;
  42. vertical-align: middle;
  43. }
  44. #commentsTabView .newCommentForm .submit:not(:disabled):hover,
  45. #commentsTabView .newCommentForm .submit:not(:disabled):focus {
  46. opacity: 1;
  47. }
  48. #commentsTabView .newCommentForm div.message {
  49. resize: none;
  50. }
  51. #commentsTabView .newCommentForm div.message:empty:before {
  52. content: attr(data-placeholder);
  53. color: grey;
  54. }
  55. #commentsTabView .comment {
  56. position: relative;
  57. /** padding bottom is little more so that the top and bottom gap look uniform **/
  58. padding: 10px 0 15px;
  59. }
  60. #commentsTabView .comments .comment {
  61. border-top: 1px solid var(--color-border);
  62. }
  63. #commentsTabView .comment .avatar,
  64. .atwho-view-ul * .avatar{
  65. width: 32px;
  66. height: 32px;
  67. line-height: 32px;
  68. margin-right: 5px;
  69. }
  70. #commentsTabView .comment .message .avatar,
  71. .atwho-view-ul * .avatar
  72. {
  73. display: inline-block;
  74. }
  75. #activityTabView li.comment.collapsed .activitymessage,
  76. #commentsTabView .comment.collapsed .message {
  77. white-space: pre-wrap;
  78. }
  79. #activityTabView li.comment.collapsed .activitymessage,
  80. #commentsTabView .comment.collapsed .message {
  81. max-height: 70px;
  82. overflow: hidden;
  83. }
  84. #activityTabView li.comment .message-overlay,
  85. #commentsTabView .comment .message-overlay {
  86. display: none;
  87. }
  88. #activityTabView li.comment.collapsed .message-overlay,
  89. #commentsTabView .comment.collapsed .message-overlay {
  90. display: block;
  91. position: absolute;
  92. z-index: 2;
  93. height: 50px;
  94. pointer-events: none;
  95. left: 0;
  96. right: 0;
  97. bottom: 0;
  98. background: -moz-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));
  99. background: -webkit-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));
  100. background: -o-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));
  101. background: -ms-linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));
  102. background: linear-gradient(rgba(var(--color-main-background), 0), var(--color-main-background));
  103. background-repeat: no-repeat;
  104. }
  105. #commentsTabView .hidden {
  106. display: none !important;
  107. }
  108. /** set min-height as 44px to ensure that it fits the button sizes. **/
  109. #commentsTabView .comment .authorRow {
  110. min-height: 44px;
  111. }
  112. #commentsTabView .comment .authorRow .tooltip {
  113. /** because of the padding on the element, the tooltip appear too far up,
  114. adding this brings them closer to the element**/
  115. margin-top: 5px;
  116. }
  117. .atwho-view-ul * .avatar-name-wrapper,
  118. #commentsTabView .comment .authorRow {
  119. position: relative;
  120. display: inline-flex;
  121. align-items: center;
  122. width: 100%;
  123. }
  124. #commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser),
  125. #commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar,
  126. #commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar img,
  127. #commentsTabView .comment .authorRow .avatar:not(.currentUser),
  128. #commentsTabView .comment .authorRow .author:not(.currentUser) {
  129. cursor: pointer;
  130. }
  131. .atwho-view-ul .avatar-name-wrapper,
  132. .atwho-view-ul .avatar-name-wrapper .avatar,
  133. .atwho-view-ul .avatar-name-wrapper .avatar img {
  134. cursor: pointer;
  135. }
  136. #commentsTabView .comments li .message .atwho-inserted,
  137. #commentsTabView .newCommentForm .atwho-inserted {
  138. .avatar-name-wrapper {
  139. /* Make the wrapper the positioning context of its child contacts
  140. * menu. */
  141. position: relative;
  142. display: inline;
  143. vertical-align: top;
  144. background-color: var(--color-background-dark);
  145. border-radius: 50vh;
  146. padding: 1px 7px 1px 1px;
  147. /* Ensure that the avatar and the user name will be kept together. */
  148. white-space: nowrap;
  149. .avatar {
  150. img {
  151. vertical-align: top;
  152. }
  153. height: 16px;
  154. width: 16px;
  155. vertical-align: middle;
  156. padding: 1px;
  157. margin-top: -3px;
  158. margin-left: 0;
  159. margin-right: 2px;
  160. }
  161. strong {
  162. /* Ensure that the user name is shown in bold, as different browsers
  163. * use different font weights for strong elements. */
  164. font-weight: bold;
  165. }
  166. }
  167. .avatar-name-wrapper.currentUser {
  168. background-color: var(--color-primary);
  169. color: var(--color-primary-text);
  170. }
  171. }
  172. .atwho-view-ul * .avatar-name-wrapper {
  173. white-space: nowrap;
  174. }
  175. #commentsTabView .comment .author,
  176. #commentsTabView .comment .date {
  177. opacity: .5;
  178. }
  179. #commentsTabView .comment .author {
  180. max-width: 210px;
  181. text-overflow: ellipsis;
  182. overflow: hidden;
  183. white-space: nowrap;
  184. }
  185. #commentsTabView .comment .date {
  186. margin-left: auto;
  187. /** this is to fix the tooltip being too close due to the margin-top applied
  188. to bring the tooltip closer for the action icons **/
  189. padding: 10px 0px;
  190. }
  191. #commentsTabView .comments > li:not(.newCommentRow) .message {
  192. padding-left: 40px;
  193. word-wrap: break-word;
  194. overflow-wrap: break-word;
  195. }
  196. #commentsTabView .comment .action {
  197. opacity: 0.3;
  198. padding: 14px;
  199. display: block;
  200. }
  201. #commentsTabView .comment .action:hover,
  202. #commentsTabView .comment .action:focus {
  203. opacity: 1;
  204. }
  205. #commentsTabView .newCommentRow .action-container {
  206. margin-left: auto;
  207. }
  208. #commentsTabView .comment.disabled .message {
  209. opacity: 0.3;
  210. }
  211. #commentsTabView .comment.disabled .action {
  212. display: none;
  213. }
  214. #commentsTabView .message.error {
  215. color: #e9322d;
  216. border-color: #e9322d;
  217. box-shadow: 0 0 6px #f8b9b7;
  218. }
  219. .app-files .action-comment {
  220. padding: 16px 14px;
  221. }
  222. #commentsTabView .comment .message .contactsmenu-popover {
  223. left: -6px;
  224. top: 24px;
  225. }