_comment_kibela.scss 3.0 KB

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