_comment_growi.scss 2.5 KB

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