_comments.scss 4.5 KB

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