_comments.scss 6.2 KB

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