_comments.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. /**
  2. * Comments Wrapper
  3. */
  4. .comments-area {
  5. & > * {
  6. margin-top: var(--global--spacing-vertical);
  7. margin-bottom: var(--global--spacing-vertical);
  8. &:first-child {
  9. margin-top: 0;
  10. }
  11. &:last-child {
  12. margin-bottom: 0;
  13. }
  14. }
  15. }
  16. /**
  17. * Comment Title
  18. */
  19. .comments-title,
  20. .comment-reply-title {
  21. font-size: var(--heading--font-size-h3);
  22. font-style: italic;
  23. letter-spacing: var(--heading--letter-spacing-h3);
  24. }
  25. .comment-reply-title {
  26. display: flex;
  27. justify-content: space-between;
  28. small {
  29. a {
  30. border-bottom: none;
  31. color: currentColor;
  32. font-family: var(--global--font-secondary);
  33. font-size: var(--global--font-size-xs);
  34. font-style: normal;
  35. font-weight: normal;
  36. letter-spacing: normal;
  37. }
  38. }
  39. }
  40. /**
  41. * Comment Lists
  42. */
  43. .comment-list {
  44. padding-left: 0;
  45. list-style: none;
  46. > li {
  47. margin-top: var(--global--spacing-vertical);
  48. margin-bottom: var(--global--spacing-vertical);
  49. }
  50. > li:not(first-child) {
  51. border-bottom: 1px solid var(--comments--border-color);
  52. }
  53. }
  54. .comment-list .children {
  55. list-style: none;
  56. padding-left: var(--global--spacing-horizontal);
  57. > li {
  58. border-top: 1px solid var(--comments--border-color);
  59. margin-top: var(--global--spacing-vertical);
  60. margin-bottom: var(--global--spacing-vertical);
  61. }
  62. @include media(mobile) {
  63. padding-left: calc(2 * var(--global--spacing-horizontal));
  64. }
  65. }
  66. /**
  67. * Comment Meta
  68. */
  69. .comment-meta {
  70. $avatar-size: var(--global--spacing-vertical);
  71. .comment-author {
  72. line-height: var(--global--line-height-heading);
  73. margin-bottom: calc(0.25 * var(--global--spacing-unit));
  74. padding-right: calc(2.5 * var(--global--spacing-horizontal));
  75. max-width: calc(100% - (3 * var(--global--spacing-horizontal)));
  76. @include media(mobile) {
  77. margin-bottom: 0;
  78. padding-right: 0;
  79. }
  80. .fn {
  81. font-family: var(--global--font-secondary);
  82. font-weight: normal;
  83. font-size: var(--global--font-size-xs);
  84. hyphens: auto;
  85. padding-left: 60px;
  86. word-wrap: break-word;
  87. word-break: break-word;
  88. }
  89. .avatar {
  90. border: 2px solid var(--global--color-border);
  91. border-radius: 50%;
  92. position: absolute;
  93. top: 5px;
  94. }
  95. }
  96. .comment-metadata {
  97. color: var(--global--color-foreground);
  98. font-size: var(--global--font-size-xs);
  99. padding-left: 60px;
  100. a {
  101. border-bottom: none;
  102. color: currentColor;
  103. &:hover,
  104. &:focus {
  105. border-bottom: 1px solid var(--global--color-secondary);
  106. color: var(--global--color-primary-hover);
  107. }
  108. &:active {
  109. color: currentColor;
  110. }
  111. }
  112. .edit-link {
  113. float: right;
  114. }
  115. }
  116. @include media(mobile) {
  117. margin-right: inherit;
  118. .comment-author {
  119. max-width: inherit;
  120. }
  121. }
  122. }
  123. .reply {
  124. font-size: var(--global--font-size-sm);
  125. line-height: var(--global--line-height-heading);
  126. a {
  127. background-color: var(--button--color-background);
  128. border-radius: var(--button--border-radius);
  129. border-bottom: none;
  130. color: var(--button--color-text);
  131. font-weight: var(--button--font-weight);
  132. font-family: var(--button--font-family);
  133. font-size: var(--button--font-size);
  134. line-height: var(--button--line-height);
  135. padding: var(--button--padding-vertical) var(--button--padding-horizontal);
  136. &:hover,
  137. &:focus,
  138. &.has-focus {
  139. color: var(--button--color-text-hover);
  140. background-color: var(--button--color-background-hover);
  141. }
  142. }
  143. }
  144. .reply {
  145. text-align: right;
  146. @include media(mobile) {
  147. text-align: left;
  148. }
  149. }
  150. .bypostauthor {
  151. display: block;
  152. }
  153. .says {
  154. display: none;
  155. }
  156. .pingback .url,
  157. .trackback .url {
  158. font-family: var(--global--font-primary);
  159. }
  160. // Comment body
  161. .comment-body {
  162. position: relative;
  163. & > * {
  164. margin-top: var(--global--spacing-vertical);
  165. margin-bottom: var(--global--spacing-vertical);
  166. }
  167. .reply {
  168. margin: calc(1.5 * var(--global--spacing-vertical)) 0;
  169. }
  170. }
  171. .comment-content a {
  172. word-wrap: break-word;
  173. }
  174. // Pingbacks & Trackbacks
  175. .pingback .comment-body,
  176. .trackback .comment-body {
  177. margin-top: var(--global--spacing-vertical);
  178. margin-bottom: var(--global--spacing-vertical);
  179. }