_comment_kibela.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. .kibela {
  2. /* Comment section */
  3. %comment-section {
  4. position: relative;
  5. padding: 1em;
  6. // speech balloon
  7. &:before {
  8. position: absolute;
  9. top: 1.5em;
  10. left: -1em;
  11. display: block;
  12. width: 0;
  13. height: 0;
  14. content: '';
  15. border-top: 20px solid transparent;
  16. border-right: 20px solid #e6e9ec;
  17. border-bottom: 20px solid transparent;
  18. border-left: 20px solid transparent;
  19. border-left-width: 0;
  20. @include media-breakpoint-down(xs) {
  21. top: 1em;
  22. }
  23. }
  24. }
  25. %picture {
  26. float: left;
  27. width: 3em;
  28. height: 3em;
  29. margin-top: 0.8em;
  30. @include media-breakpoint-down(xs) {
  31. width: 2em;
  32. height: 2em;
  33. }
  34. }
  35. .page-comments-row {
  36. margin: 10px 0px;
  37. }
  38. .page-comments {
  39. h4 {
  40. margin-bottom: 1em;
  41. }
  42. }
  43. .page-comment {
  44. position: relative;
  45. // ユーザー名
  46. .page-comment-creator {
  47. margin-top: -0.5em;
  48. margin-bottom: 0.5em;
  49. font-weight: bold;
  50. }
  51. // ユーザーアイコン
  52. .picture {
  53. @extend %picture;
  54. }
  55. // コメントセクション
  56. .page-comment-main {
  57. @extend %comment-section;
  58. margin-left: 4.5em;
  59. background: #e6e9ec;
  60. border-radius: 0.35em;
  61. }
  62. // コメント本文
  63. .page-comment-body {
  64. margin-bottom: 0.5em;
  65. word-wrap: break-word;
  66. }
  67. }
  68. /*
  69. * reply
  70. */
  71. .page-comment-reply {
  72. margin-top: 1em;
  73. }
  74. // remove margin after hidden replies
  75. .page-comments-hidden-replies + .page-comment-reply {
  76. margin-top: 0;
  77. }
  78. .page-comment-reply,
  79. .page-comment-reply-form {
  80. margin-right: 15px;
  81. margin-left: 6em;
  82. }
  83. // reply button
  84. .btn.btn-comment-reply {
  85. width: 120px;
  86. margin-top: 0.5em;
  87. margin-right: 15px;
  88. border-top: none;
  89. border-right: none;
  90. border-left: none;
  91. }
  92. // display cheatsheet for comment form only
  93. .comment-form {
  94. .editor-cheatsheet {
  95. display: none;
  96. }
  97. position: relative;
  98. margin-top: 1em;
  99. // user icon
  100. .picture {
  101. @extend %picture;
  102. }
  103. // seciton
  104. .comment-form-main {
  105. @extend %comment-section;
  106. margin-left: 4.5em;
  107. @include media-breakpoint-down(xs) {
  108. margin-left: 3.5em;
  109. }
  110. background: #e6e9ec;
  111. border-radius: 0.35em;
  112. .CodeMirror {
  113. border: 0px;
  114. }
  115. }
  116. // textarea
  117. .comment-write {
  118. margin-bottom: 0.5em;
  119. }
  120. .comment-form-comment {
  121. height: 80px;
  122. &:focus,
  123. &:not(:invalid) {
  124. height: 180px;
  125. transition: height 0.2s ease-out;
  126. }
  127. }
  128. .CodeMirror {
  129. border: 0px !important;
  130. }
  131. //// TODO: migrate to Bootstrap 4
  132. // use @include media-breakpoint-*
  133. // #page-editor {
  134. // @media (max-width: $screen-sm) {
  135. // .desc-long {
  136. // display: none;
  137. // }
  138. // }
  139. // }
  140. // @media screen and (max-width: 1400px) {
  141. // .desc-long {
  142. // display: none;
  143. // }
  144. // @media screen and (max-width: 570px) {
  145. // .gfm-cheatsheet {
  146. // display: none;
  147. // }
  148. // }
  149. // }
  150. }
  151. }