_comments.scss 6.3 KB

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