_comments.scss 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. .comment-content a {
  2. word-wrap: break-word;
  3. }
  4. .bypostauthor {
  5. display: block;
  6. }
  7. .comments-area {
  8. margin: calc(2 * #{$size__spacing-unit}) $size__spacing-unit $size__spacing-unit;
  9. @include media(tablet) {
  10. margin: $size__spacing-unit auto calc(3 * #{$size__spacing-unit});
  11. max-width: $size__site-tablet-content;
  12. }
  13. @include media(desktop) {
  14. max-width: $size__site-desktop-content;
  15. }
  16. & > * {
  17. margin-top: calc(2 * #{$size__spacing-unit});
  18. margin-bottom: calc(2 * #{$size__spacing-unit});
  19. @include media(tablet) {
  20. margin-top: calc(3 * #{$size__spacing-unit});
  21. margin-bottom: calc(3 * #{$size__spacing-unit});
  22. }
  23. }
  24. /* Add extra margin when the comments section is located immediately after the
  25. * post itself (this happens on pages).
  26. */
  27. .entry + & {
  28. margin-top: calc(3 * #{$size__spacing-unit});
  29. }
  30. .comments-title-wrap {
  31. @include media(tablet) {
  32. align-items: baseline;
  33. display: flex;
  34. justify-content: space-between;
  35. }
  36. .comments-title {
  37. margin: 0;
  38. @include media(tablet) {
  39. flex: 1 0 calc(3 * (100vw / 12));
  40. }
  41. }
  42. .discussion-meta {
  43. @include media(tablet) {
  44. flex: 0 0 calc(2 * (100vw / 12));
  45. margin-left: #{$size__spacing-unit};
  46. }
  47. }
  48. }
  49. }
  50. #comment {
  51. max-width: 100%;
  52. box-sizing: border-box;
  53. }
  54. #respond {
  55. position: relative;
  56. .comment-user-avatar {
  57. margin: $size__spacing-unit 0 -#{$size__spacing-unit};
  58. }
  59. .comment .comment-form {
  60. padding-left: 0;
  61. }
  62. > small {
  63. display: block;
  64. font-size: $font__size_base;
  65. position: absolute;
  66. left: calc(#{$size__spacing-unit} + 100%);
  67. top: calc(-3.5 * #{$size__spacing-unit});
  68. width: calc(100vw / 12 );
  69. }
  70. }
  71. #comments {
  72. > .comments-title:last-child {
  73. display: none;
  74. }
  75. }
  76. .comment-form-flex {
  77. display: flex;
  78. flex-direction: column;
  79. .comments-title {
  80. display: none;
  81. margin: 0;
  82. order: 1;
  83. }
  84. #respond {
  85. order: 2;
  86. + .comments-title {
  87. display: block;
  88. }
  89. }
  90. }
  91. .comment-list {
  92. list-style: none;
  93. padding: 0;
  94. .children {
  95. margin: 0;
  96. padding: 0 0 0 $size__spacing-unit;
  97. }
  98. > .comment:first-child {
  99. margin-top: 0;
  100. }
  101. .pingback,
  102. .trackback {
  103. .comment-body {
  104. color: $color__text-dark;
  105. font-family: $font__heading;
  106. font-size: $font__size-xs;
  107. font-weight: 500;
  108. margin-top: $size__spacing-unit;
  109. margin-bottom: $size__spacing-unit;
  110. a:not(.comment-edit-link) {
  111. font-weight: bold;
  112. font-size: $font__size-base / (1 * $font__size-ratio);
  113. line-height: 1.5;
  114. padding-right: #{0.5 * $size__spacing-unit};
  115. display: block;
  116. }
  117. .comment-edit-link {
  118. color: $color__text-dark;
  119. font-family: $font__heading;
  120. font-weight: 500;
  121. }
  122. }
  123. }
  124. }
  125. .comment-reply {
  126. #respond + & {
  127. display: none;
  128. }
  129. .comment-reply-link {
  130. display: inline-block;
  131. }
  132. }
  133. .comment {
  134. list-style: none;
  135. position: relative;
  136. @include media(tablet) {
  137. padding-left: calc(.5 * (#{$size__spacing-unit} + calc(100vw / 12 )));
  138. &.depth-1,
  139. .children {
  140. padding-left: 0;
  141. }
  142. &.depth-1 {
  143. margin-left: calc(3.25 * #{$size__spacing-unit});
  144. }
  145. }
  146. .comment-body {
  147. margin: calc(2 * #{$size__spacing-unit}) 0 0;
  148. }
  149. .comment-meta {
  150. position: relative;
  151. }
  152. .comment-author {
  153. .avatar {
  154. float: left;
  155. margin-right: $size__spacing-unit;
  156. position: relative;
  157. @include media(tablet) {
  158. float: inherit;
  159. margin-right: inherit;
  160. position: absolute;
  161. top: 0;
  162. right: calc(100% + #{$size__spacing-unit});
  163. }
  164. }
  165. .fn {
  166. position: relative;
  167. display: block;
  168. a {
  169. color: inherit;
  170. &:hover {
  171. color: $color__link-hover;
  172. }
  173. }
  174. }
  175. .post-author-badge {
  176. border-radius: 100%;
  177. display: block;
  178. height: 18px;
  179. position: absolute;
  180. background: lighten( $color__link, 8% );
  181. right: calc(100% - #{$size__spacing-unit * 2.5});
  182. top: -3px;
  183. width: 18px;
  184. @include media(tablet) {
  185. right: calc(100% + #{$size__spacing-unit * .75});
  186. }
  187. svg {
  188. width: inherit;
  189. height: inherit;
  190. display: block;
  191. fill: white;
  192. transform: scale(0.875);
  193. }
  194. }
  195. }
  196. .comment-metadata {
  197. > a,
  198. .comment-edit-link {
  199. display: inline;
  200. font-weight: 500;
  201. color: $color__text-dark;
  202. vertical-align: baseline;
  203. time {
  204. vertical-align: baseline;
  205. }
  206. &:hover {
  207. color: $color__link-hover;
  208. text-decoration: none;
  209. }
  210. }
  211. > * {
  212. display: inline-block;
  213. }
  214. .edit-link-sep {
  215. color: $color__text-dark;
  216. margin: 0 0.2em;
  217. vertical-align: baseline;
  218. }
  219. .edit-link {
  220. color: $color__text-dark;
  221. svg {
  222. transform: scale(0.8);
  223. vertical-align: baseline;
  224. margin-right: 0.1em;
  225. }
  226. }
  227. .comment-edit-link {
  228. position: relative;
  229. padding-left: $size__spacing-unit;
  230. margin-left: -#{$size__spacing-unit};
  231. z-index: 1;
  232. &:hover {
  233. color: $color__link;
  234. }
  235. }
  236. }
  237. .comment-content {
  238. margin: $size__spacing-unit 0;
  239. @include media(desktop) {
  240. padding-right: $size__spacing-unit;
  241. }
  242. > *:first-child {
  243. margin-top: 0;
  244. }
  245. > *:last-child {
  246. margin-bottom: 0;
  247. }
  248. blockquote {
  249. margin-left: 0;
  250. }
  251. a {
  252. text-decoration: underline;
  253. &:hover {
  254. text-decoration: none;
  255. }
  256. }
  257. }
  258. }
  259. .comment-reply-link,
  260. #cancel-comment-reply-link {
  261. font-weight: 500;
  262. &:hover {
  263. color: $color__link-hover;
  264. }
  265. }
  266. .discussion-avatar-list {
  267. @include clearfix;
  268. margin: 0;
  269. padding: 0;
  270. li {
  271. position: relative;
  272. list-style: none;
  273. margin: 0 -8px 0 0;
  274. padding: 0;
  275. float: left;
  276. }
  277. .comment-user-avatar {
  278. img {
  279. height: calc(1.5 * #{$size__spacing-unit});
  280. width: calc(1.5 * #{$size__spacing-unit});
  281. }
  282. }
  283. }
  284. .discussion-meta {
  285. .discussion-meta-info {
  286. margin: 0;
  287. .svg-icon {
  288. vertical-align: middle;
  289. fill: currentColor;
  290. transform: scale( 0.6 ) scaleX(-1) translateY(-0.1em);
  291. margin-left: -#{.25 * $size__spacing-unit}; // Align icon with avatars above.
  292. }
  293. }
  294. }
  295. .comment-form {
  296. .comment-notes,
  297. label {
  298. font-family: $font__heading;
  299. font-size: $font__size-xs;
  300. color: $color__text-dark;
  301. }
  302. .comment-form-author:not(.comment-form-field),
  303. .comment-form-email:not(.comment-form-field) {
  304. @include media(tablet) {
  305. width: calc(50% - #{$size__spacing-unit / 2});
  306. float: left;
  307. }
  308. }
  309. .comment-form-email:not(.comment-form-field) {
  310. @include media(tablet) {
  311. margin-left: $size__spacing-unit;
  312. }
  313. }
  314. input[name="author"],
  315. input[name="email"],
  316. input[name="url"] {
  317. display: block;
  318. width: 100%;
  319. }
  320. }