_comments.scss 6.2 KB

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