Comment.module.scss 2.1 KB

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