Comment.module.scss 1.8 KB

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