_comment_growi.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. .growi {
  2. %comment-section {
  3. position: relative;
  4. padding: 1em;
  5. // speech balloon
  6. &:before {
  7. position: absolute;
  8. top: 1.5em;
  9. left: -1em;
  10. display: block;
  11. width: 0;
  12. content: '';
  13. border: 1em solid transparent;
  14. border-left-width: 0;
  15. @include media-breakpoint-down(xs) {
  16. top: 1em;
  17. }
  18. }
  19. }
  20. %picture {
  21. float: left;
  22. width: 3em;
  23. height: 3em;
  24. margin-top: 0.8em;
  25. @include media-breakpoint-down(xs) {
  26. width: 2em;
  27. height: 2em;
  28. }
  29. }
  30. .page-comments-row {
  31. margin: 30px 0px;
  32. border-top: 5px solid;
  33. }
  34. .page-comments {
  35. h4 {
  36. margin-bottom: 1em;
  37. }
  38. }
  39. .page-comment-writer {
  40. @include media-breakpoint-down(xs) {
  41. height: 3.5em;
  42. }
  43. }
  44. .page-comment {
  45. position: relative;
  46. padding-top: 70px;
  47. margin-top: -70px;
  48. // ユーザー名
  49. .page-comment-creator {
  50. margin-top: -0.5em;
  51. margin-bottom: 0.5em;
  52. font-weight: bold;
  53. }
  54. // ユーザーアイコン
  55. .picture {
  56. @extend %picture;
  57. }
  58. // コメントセクション
  59. .page-comment-main {
  60. @extend %comment-section;
  61. @include media-breakpoint-up(sm) {
  62. margin-left: 4.5em;
  63. }
  64. @include media-breakpoint-down(xs) {
  65. &:before {
  66. content: none;
  67. }
  68. }
  69. }
  70. // コメント本文
  71. .page-comment-body {
  72. margin-bottom: 0.5em;
  73. word-wrap: break-word;
  74. }
  75. }
  76. /*
  77. * reply
  78. */
  79. .page-comment-reply {
  80. margin-top: 1em;
  81. }
  82. // remove margin after hidden replies
  83. .page-comments-hidden-replies + .page-comment-reply {
  84. margin-top: 0;
  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. // display cheatsheet for comment form only
  96. .comment-form {
  97. .editor-cheatsheet {
  98. display: none;
  99. }
  100. position: relative;
  101. margin-top: 1em;
  102. // user icon
  103. .picture {
  104. @extend %picture;
  105. }
  106. // seciton
  107. .comment-form-main {
  108. @extend %comment-section;
  109. margin-left: 4.5em;
  110. @include media-breakpoint-down(xs) {
  111. margin-left: 3.5em;
  112. }
  113. }
  114. // textarea
  115. .comment-write {
  116. margin-bottom: 0.5em;
  117. }
  118. .comment-form-comment {
  119. height: 80px;
  120. &:focus,
  121. &:not(:invalid) {
  122. height: 180px;
  123. transition: height 0.2s ease-out;
  124. }
  125. }
  126. .comment-form-preview {
  127. padding-top: 0.5em;
  128. }
  129. }
  130. }