_comments.scss 6.2 KB

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