CommentEditor.module.scss 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. @use '@growi/core-styles/scss/bootstrap/init' as bs;
  2. @use './comment-inheritance';
  3. @use '../PageEditor/page-editor-inheritance';
  4. // display cheatsheet for comment form only
  5. .comment-editor-styles :global {
  6. .comment-form {
  7. position: relative;
  8. // background
  9. .bg-comment {
  10. @extend %bg-comment
  11. }
  12. // user icon
  13. .user-picture {
  14. @extend %user-picture;
  15. }
  16. }
  17. }
  18. // adjust height
  19. .comment-editor-styles :global {
  20. // Set `display: flex` instead of `display: block` to make it work with `flex: 1` of the children
  21. // This helps users focus on the editor by clicking on the broader area
  22. .tab-pane.active {
  23. display: flex;
  24. }
  25. .cm-editor {
  26. min-height: comment-inheritance.$codemirror-default-height !important;
  27. max-height: #{2 * comment-inheritance.$codemirror-default-height};
  28. }
  29. .cm-gutters {
  30. min-height: comment-inheritance.$codemirror-default-height !important;
  31. }
  32. .comment-preview-container {
  33. min-height: page-editor-inheritance.$navbar-editor-height + comment-inheritance.$codemirror-default-height;
  34. padding-top: 0.5em;
  35. }
  36. }
  37. // border-radius
  38. .comment-editor-styles :global {
  39. .cm-editor, .cm-scroller {
  40. border-radius: var(--bs-border-radius);
  41. }
  42. }
  43. // remove outline
  44. .comment-editor-styles :global {
  45. .cm-editor {
  46. outline: none;
  47. }
  48. }