Comment.module.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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-writer {
  6. @include bs.media-breakpoint-down(xs) {
  7. height: 3.5em;
  8. }
  9. }
  10. .page-comment {
  11. position: relative;
  12. pointer-events: none;
  13. scroll-margin-top: var.$grw-scroll-margin-top-in-view;
  14. // user name
  15. .page-comment-creator {
  16. margin-top: -0.5em;
  17. margin-bottom: 0.5em;
  18. font-weight: bold;
  19. }
  20. // user icon
  21. .picture {
  22. @extend %picture;
  23. }
  24. // comment section
  25. .page-comment-main {
  26. @extend %comment-section;
  27. @include bs.media-breakpoint-up(sm) {
  28. margin-left: 4.5em;
  29. }
  30. @include bs.media-breakpoint-down(xs) {
  31. &:before {
  32. content: none;
  33. }
  34. }
  35. pointer-events: auto;
  36. // delete button
  37. .page-comment-control {
  38. position: absolute;
  39. top: 0;
  40. right: 0;
  41. visibility: hidden;
  42. }
  43. &:hover > .page-comment-control {
  44. visibility: visible;
  45. }
  46. }
  47. // comment body
  48. .page-comment-body {
  49. margin-bottom: 0.5em;
  50. word-wrap: break-word;
  51. }
  52. // older comments
  53. &.page-comment-older {
  54. }
  55. // newer comments
  56. &.page-comment-newer {
  57. opacity: 0.7;
  58. &:hover {
  59. opacity: 1;
  60. }
  61. }
  62. .page-comment-meta {
  63. display: flex;
  64. justify-content: flex-end;
  65. font-size: 0.9em;
  66. color: bs.$gray-400;
  67. }
  68. .page-comment-revision svg {
  69. width: 16px;
  70. height: 16px;
  71. }
  72. }
  73. // TODO: Refacotr Soft-coding
  74. .page-comment-comment-body-skeleton {
  75. position: relative;
  76. height: 66px;
  77. padding: 1em;
  78. margin-left: 4.5em;
  79. @include bs.media-breakpoint-down(xs) {
  80. margin-left: 3.5em;
  81. }
  82. }
  83. }