Comment.module.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. @use '@growi/core-styles/scss/bootstrap/init' as bs;
  2. @use 'styles/variables' as var;
  3. @use './comment-inheritance';
  4. .comment-styles {
  5. :global(.page-comment) {
  6. position: relative;
  7. pointer-events: none;
  8. scroll-margin-top: var.$grw-scroll-margin-top-in-view;
  9. // background
  10. :global(.bg-comment) {
  11. @extend %bg-comment;
  12. }
  13. // user icon
  14. :global(.user-picture) {
  15. @extend %user-picture;
  16. }
  17. // comment section
  18. :global(.page-comment-main) {
  19. @extend %comment-section;
  20. pointer-events: auto;
  21. // delete button
  22. :global(.page-comment-control) {
  23. position: absolute;
  24. top: 0;
  25. right: 0;
  26. visibility: hidden;
  27. }
  28. &:hover > :global(.page-comment-control) {
  29. visibility: visible;
  30. }
  31. }
  32. // comment body
  33. :global(.page-comment-body) {
  34. word-wrap: break-word;
  35. :global(.wiki) {
  36. p {
  37. margin: 8px 0;
  38. }
  39. blockquote {
  40. margin: 24px 0 8px;
  41. &:first-child {
  42. margin-top: 0;
  43. }
  44. }
  45. }
  46. }
  47. // older comments
  48. // &.page-comment-older {
  49. // }
  50. // newer comments
  51. &:global(.page-comment-newer) {
  52. opacity: 0.7;
  53. &:hover {
  54. opacity: 1;
  55. }
  56. }
  57. :global(.page-comment-revision) {
  58. :global(.material-symbols-outlined) {
  59. font-size: 16px;
  60. vertical-align: middle;
  61. }
  62. }
  63. :global(.page-comment-meta) {
  64. display: flex;
  65. justify-content: flex-end;
  66. font-size: 0.9em;
  67. color: bs.$gray-400;
  68. }
  69. }
  70. // TODO: Refacotr Soft-coding
  71. :global(.page-comment-comment-body-skeleton) {
  72. position: relative;
  73. height: 66px;
  74. padding: 1em;
  75. margin-left: 4.5em;
  76. @include bs.media-breakpoint-down(xs) {
  77. margin-left: 3.5em;
  78. }
  79. }
  80. }
  81. // // Light mode color
  82. @include bs.color-mode(light) {
  83. .comment-styles {
  84. :global(.page-comment-revision) {
  85. color: bs.$gray-500;
  86. }
  87. }
  88. }
  89. // // Dark mode color
  90. @include bs.color-mode(dark) {
  91. .comment-styles {
  92. :global(.page-comment-revision) {
  93. color: bs.$gray-600;
  94. }
  95. }
  96. }