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.

256 lines
4.8 KiB

10 years ago
10 years ago
  1. /*
  2. * # Semantic - Comment
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'view';
  15. @element : 'comment';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Standard
  19. *******************************/
  20. /*--------------
  21. Comments
  22. ---------------*/
  23. .ui.comments {
  24. margin: @margin;
  25. max-width: @maxWidth;
  26. }
  27. .ui.comments:first-child {
  28. margin-top: 0em;
  29. }
  30. .ui.comments:last-child {
  31. margin-bottom: 0em;
  32. }
  33. /*--------------
  34. Comment
  35. ---------------*/
  36. .ui.comments .comment {
  37. position: relative;
  38. background: @commentBackground;
  39. margin: @commentMargin;
  40. padding: @commentPadding;
  41. border: @commentBorder;
  42. border-top: @commentDivider;
  43. line-height: @commentLineHeight;
  44. }
  45. .ui.comments .comment:first-child {
  46. margin-top: @firstCommentMargin;
  47. padding-top: @firstCommentPadding;
  48. }
  49. /*--------------------
  50. Nested Comments
  51. ---------------------*/
  52. .ui.comments .comment .comments {
  53. margin: @nestedCommentsMargin;
  54. padding: @nestedCommentsPadding;
  55. }
  56. .ui.comments .comment .comments:before{
  57. position: absolute;
  58. top: 0px;
  59. left: 0px;
  60. }
  61. .ui.comments .comment .comments .comment {
  62. border: @nestedCommentBorder;
  63. border-top: @nestedCommentDivider;
  64. background: @nestedCommentBackground;
  65. }
  66. /*--------------
  67. Avatar
  68. ---------------*/
  69. .ui.comments .comment .avatar {
  70. display: @avatarDisplay;
  71. width: @avatarWidth;
  72. height: @avatarHeight;
  73. float: @avatarFloat;
  74. margin: @avatarMargin;
  75. }
  76. .ui.comments .comment img.avatar,
  77. .ui.comments .comment .avatar img {
  78. display: block;
  79. margin: 0em auto;
  80. width: 100%;
  81. height: 100%;
  82. border-radius: @avatarBorderRadius;
  83. }
  84. /*--------------
  85. Content
  86. ---------------*/
  87. .ui.comments .comment > .content {
  88. display: block;
  89. }
  90. /* If there is an avatar move content over */
  91. .ui.comments .comment > .avatar ~ .content {
  92. margin-left: @contentMargin;
  93. }
  94. /*--------------
  95. Author
  96. ---------------*/
  97. .ui.comments .comment .author {
  98. font-size: @authorFontSize;
  99. color: @authorColor;
  100. font-weight: @authorFontWeight;
  101. }
  102. .ui.comments .comment a.author {
  103. cursor: pointer;
  104. }
  105. .ui.comments .comment a.author:hover {
  106. color: @authorHoverColor;
  107. }
  108. /*--------------
  109. Metadata
  110. ---------------*/
  111. .ui.comments .comment .metadata {
  112. display: @metadataDisplay;
  113. margin-left: @metadataSpacing;
  114. color: @metadataColor;
  115. font-size: @metadataFontSize;
  116. }
  117. .ui.comments .comment .metadata > * {
  118. display: inline-block;
  119. margin: 0em @metadataContentSpacing 0em 0em;
  120. }
  121. .ui.comments .comment .metadata > :last-child {
  122. margin-right: 0em;
  123. }
  124. /*--------------------
  125. Comment Text
  126. ---------------------*/
  127. .ui.comments .comment .text {
  128. margin: @textMargin;
  129. font-size: @textFontSize;
  130. word-wrap: @textWordWrap;
  131. color: @textColor;
  132. line-height: @textLineHeight;
  133. }
  134. /*--------------------
  135. User Actions
  136. ---------------------*/
  137. .ui.comments .comment .actions {
  138. font-size: @actionFontSize;
  139. }
  140. .ui.comments .comment .actions a {
  141. cursor: pointer;
  142. display: inline-block;
  143. margin: 0em @actionContentDistance 0em 0em;
  144. color: @actionLinkColor;
  145. }
  146. .ui.comments .comment .actions a:last-child {
  147. margin-right: 0em;
  148. }
  149. .ui.comments .comment .actions a.active,
  150. .ui.comments .comment .actions a:hover {
  151. color: @actionLinkHoverColor;
  152. }
  153. /*--------------------
  154. Reply Form
  155. ---------------------*/
  156. .ui.comments > .reply.form {
  157. margin-top: @replyDistance;
  158. }
  159. .ui.comments .comment .reply.form {
  160. width: 100%;
  161. margin-top: @commentReplyDistance;
  162. }
  163. .ui.comments .reply.form textarea {
  164. font-size: @replyFontSize;
  165. height: @replyHeight;
  166. }
  167. /*******************************
  168. State
  169. *******************************/
  170. .ui.collapsed.comments,
  171. .ui.comments .collapsed.comments,
  172. .ui.comments .collapsed.comment {
  173. display: none;
  174. }
  175. /*******************************
  176. Variations
  177. *******************************/
  178. /*--------------------
  179. Threaded
  180. ---------------------*/
  181. .ui.threaded.comments .comment .comments {
  182. margin: @threadedCommentMargin;
  183. padding: @threadedCommentPadding;
  184. box-shadow: @threadedCommentBoxShadow;
  185. }
  186. /*--------------------
  187. Minimal
  188. ---------------------*/
  189. .ui.minimal.comments .comment .actions {
  190. opacity: 0;
  191. position: @minimalActionPosition;
  192. top: @minimalActionTop;
  193. right: @minimalActionRight;
  194. left: @minimalActionLeft;
  195. transition: @minimalTransition;
  196. transition-delay: @minimalTransitionDelay;
  197. }
  198. .ui.minimal.comments .comment > .content:hover > .actions {
  199. opacity: 1;
  200. }
  201. /*--------------------
  202. Sizes
  203. ---------------------*/
  204. .ui.small.comments {
  205. font-size: @small;
  206. }
  207. .ui.comments {
  208. font-size: @medium;
  209. }
  210. .ui.large.comments {
  211. font-size: @large;
  212. }
  213. .ui.huge.comments {
  214. font-size: @huge;
  215. }
  216. .loadUIOverrides();