_editor.scss 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. @use '@growi/core/scss/bootstrap/init' as bs;
  2. @use './variables' as var;
  3. @import './organisms/wiki-custom-sidebar';
  4. // global imported
  5. .layout-root.editing {
  6. overflow-y: hidden !important;
  7. .page-wrapper {
  8. top: 0;
  9. height: 100vh;
  10. }
  11. // show
  12. .d-edit-block {
  13. display: block !important;
  14. }
  15. // hide unnecessary elements
  16. .d-edit-none {
  17. display: none !important;
  18. }
  19. /*****************
  20. * Expand Editor
  21. *****************/
  22. .grw-editor-navbar-bottom {
  23. height: var.$grw-editor-navbar-bottom-height;
  24. .grw-grant-selector {
  25. @include bs.media-breakpoint-down(sm) {
  26. .btn .label {
  27. display: none;
  28. }
  29. }
  30. @include bs.media-breakpoint-up(md) {
  31. .dropdown-toggle {
  32. min-width: 100px;
  33. // caret
  34. &::after {
  35. margin-left: 1em;
  36. }
  37. }
  38. }
  39. }
  40. .btn-submit {
  41. width: 100px;
  42. }
  43. .btn-expand {
  44. // rotate icon
  45. i {
  46. display: inline-block;
  47. transition: transform 200ms;
  48. }
  49. &.expand i {
  50. transform: rotate(-180deg);
  51. }
  52. }
  53. }
  54. /*********************
  55. * Navigation styles
  56. */
  57. .grw-subnav {
  58. padding-bottom: 0;
  59. h1 {
  60. font-size: 16px;
  61. }
  62. .grw-drawer-toggler {
  63. width: 38px;
  64. height: 38px;
  65. font-size: 18px;
  66. }
  67. }
  68. .grw-copy-dropdown {
  69. .btn-copy {
  70. padding: 3px !important; // overwrite padding
  71. }
  72. }
  73. &.builtin-editor {
  74. /*****************
  75. * Editor styles
  76. *****************/
  77. .page-editor-editor-container {
  78. border-right: 1px solid transparent;
  79. // add icon on cursor
  80. .markdown-table-activated,
  81. .markdown-link-activated {
  82. .CodeMirror-cursor {
  83. &:after {
  84. position: relative;
  85. top: -1.1em;
  86. left: 0.3em;
  87. display: block;
  88. width: 1em;
  89. height: 1em;
  90. content: ' ';
  91. background-repeat: no-repeat;
  92. background-size: 1em;
  93. }
  94. }
  95. }
  96. .markdown-table-activated .CodeMirror-cursor {
  97. &:after {
  98. background-image: url(/images/icons/editor/table.svg);
  99. }
  100. }
  101. .markdown-link-activated .CodeMirror-cursor {
  102. &:after {
  103. background-image: url(/images/icons/editor/link.svg);
  104. }
  105. }
  106. .textarea-editor {
  107. font-family: var(--font-family-monospace);
  108. border: none;
  109. }
  110. }
  111. .page-editor-preview-container {
  112. }
  113. .page-editor-preview-body {
  114. flex-grow: 1;
  115. padding: 18px 15px 0;
  116. overflow-y: scroll;
  117. }
  118. // editing /Sidebar
  119. .page-editor-preview-body.preview-sidebar {
  120. flex-grow: 0;
  121. width: 320px;
  122. margin-right: auto;
  123. margin-left: auto;
  124. .wiki {
  125. @extend %grw-custom-sidebar-content;
  126. }
  127. }
  128. .grw-editor-configuration-dropdown {
  129. .icon-container {
  130. width: 20px;
  131. }
  132. .menuitem-label {
  133. min-width: 130px;
  134. }
  135. }
  136. }
  137. // .builtin-editor .tab-pane#edit
  138. /*****************
  139. * Toastr
  140. *****************/
  141. .Toastify .Toastify__toast-container {
  142. top: 4.5em;
  143. }
  144. }
  145. .layout-root.editing {
  146. &:not(.growi-layout-fluid) .page-editor-preview-body {
  147. .wiki {
  148. max-width: 980px;
  149. margin: 0 auto;
  150. }
  151. }
  152. &.growi-layout-fluid .page-editor-preview-body {
  153. .wiki {
  154. margin: 0 auto;
  155. }
  156. }
  157. }
  158. // TODO: Never used this id class
  159. #tag-edit-button-tooltip {
  160. .tooltip-inner {
  161. color: black;
  162. background-color: white;
  163. border: 1px solid bs.$gray-300;
  164. }
  165. .tooltip-arrow {
  166. border-bottom: 5px solid bs.$gray-300;
  167. }
  168. }