_comments.scss 6.1 KB

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