_editor.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. @use '@growi/core-styles/scss/bootstrap/init' as bs;
  2. @use './variables' as var;
  3. @import './organisms/wiki-custom-sidebar';
  4. :root {
  5. --grw-codemirror-editor-content-font-family: var(--font-family-monospace);
  6. }
  7. // global imported
  8. .layout-root.editing {
  9. overflow: hidden !important;
  10. .page-wrapper{
  11. height: 100vh;
  12. }
  13. // show
  14. .d-edit-block {
  15. display: block !important;
  16. }
  17. // hide unnecessary elements
  18. .d-edit-none {
  19. display: none !important;
  20. }
  21. /*****************
  22. * Expand Editor
  23. *****************/
  24. .dynamic-layout-root {
  25. @extend .flex-expand-vh-100;
  26. }
  27. &.builtin-editor {
  28. /*****************
  29. * Editor styles
  30. *****************/
  31. .page-editor-editor-container {
  32. border-right: 1px solid transparent;
  33. // add icon on cursor
  34. .markdown-table-activated,
  35. .markdown-link-activated {
  36. .CodeMirror-cursor {
  37. &::after {
  38. position: relative;
  39. top: -1.1em;
  40. left: 0.3em;
  41. display: block;
  42. width: 1em;
  43. height: 1em;
  44. content: ' ';
  45. background-repeat: no-repeat;
  46. background-size: 1em;
  47. }
  48. }
  49. }
  50. .markdown-table-activated .CodeMirror-cursor {
  51. &::after {
  52. background-image: url('/images/icons/editor/table.svg');
  53. }
  54. }
  55. .markdown-link-activated .CodeMirror-cursor {
  56. &::after {
  57. background-image: url('/images/icons/editor/link.svg');
  58. }
  59. }
  60. }
  61. .page-editor-preview-container {
  62. }
  63. .page-editor-preview-body {
  64. flex-grow: 1;
  65. padding: 18px 15px 0;
  66. overflow-y: scroll;
  67. }
  68. // editing /Sidebar
  69. .page-editor-preview-body.preview-sidebar {
  70. flex-grow: 0;
  71. width: 320px;
  72. margin-right: auto;
  73. margin-left: auto;
  74. .wiki {
  75. @extend %grw-custom-sidebar-content;
  76. }
  77. }
  78. }
  79. // .builtin-editor .tab-pane#edit
  80. /*****************
  81. * Toastr
  82. *****************/
  83. .Toastify .Toastify__toast-container {
  84. top: 4.5em;
  85. }
  86. }
  87. // TODO: Never used this id class
  88. #tag-edit-button-tooltip {
  89. .tooltip-inner {
  90. color: black;
  91. background-color: white;
  92. border: 1px solid bs.$gray-300;
  93. }
  94. .tooltip-arrow {
  95. border-bottom: 5px solid bs.$gray-300;
  96. }
  97. }