ide.scss 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. @use 'sass:color';
  2. $editor-toggler-bg-dark-color: color.adjust(
  3. $content-disabled,
  4. $lightness: -15%
  5. );
  6. :root {
  7. --editor-toggler-bg-color: #{$editor-toggler-bg-dark-color};
  8. --editor-resizer-bg-color: var(--bg-dark-secondary);
  9. }
  10. @include theme('light') {
  11. --editor-toggler-bg-color: var(--content-disabled);
  12. --editor-resizer-bg-color: var(--bg-light-tertiary);
  13. }
  14. #ide-root {
  15. height: 100vh; /* for backwards compatibility */
  16. height: 100dvh; /* needed for mobile devices */
  17. .global-alerts {
  18. position: absolute;
  19. top: 0;
  20. left: 0;
  21. right: 0;
  22. display: flex;
  23. flex-direction: column;
  24. align-items: center;
  25. }
  26. .chat {
  27. position: relative;
  28. height: 100%;
  29. }
  30. .review-panel-wrapper {
  31. &.rp-state-overview {
  32. position: sticky;
  33. top: 0;
  34. height: 100%;
  35. }
  36. }
  37. }
  38. .global-alerts {
  39. height: 0;
  40. margin-top: var(--spacing-01);
  41. text-align: center;
  42. [role='alert'] {
  43. text-align: left;
  44. min-width: 400px;
  45. position: relative;
  46. z-index: 20;
  47. }
  48. }
  49. .ide-react-editor-sidebar {
  50. background-color: var(--file-tree-bg);
  51. height: 100%;
  52. color: var(--content-secondary-dark);
  53. position: relative;
  54. }
  55. .ide-react-body {
  56. flex-grow: 1;
  57. background-color: var(--bg-light-secondary);
  58. overflow-y: hidden;
  59. z-index: 0;
  60. }
  61. .ide-react-main {
  62. height: 100%;
  63. display: flex;
  64. flex-direction: column;
  65. .toolbar.toolbar-header {
  66. position: static;
  67. flex-grow: 0;
  68. color: var(--neutral-20);
  69. }
  70. }
  71. .ide-react-symbol-palette {
  72. height: 100%;
  73. background-color: var(--bg-dark-tertiary);
  74. color: var(--neutral-20);
  75. }
  76. .ide-react-editor-panel {
  77. display: flex;
  78. flex-direction: column;
  79. }
  80. // Ensure an element with class "full-size", such as the binary file view, stays within the bounds of the panel
  81. .ide-react-panel {
  82. position: relative;
  83. container-type: size;
  84. }
  85. .ide-panel-group-resizing {
  86. background-color: var(--white);
  87. // Hide panel contents while resizing
  88. .ide-react-editor-content,
  89. .pdf {
  90. display: none !important;
  91. }
  92. }
  93. .modal.lock-editor-modal {
  94. display: flex !important;
  95. background-color: rgba($bg-dark-primary, 0.3);
  96. overflow-y: hidden;
  97. pointer-events: none;
  98. .modal-dialog {
  99. top: 25px;
  100. }
  101. }
  102. .out-of-sync-modal {
  103. .text-preview {
  104. margin-top: var(--spacing-05);
  105. .scroll-container {
  106. @include body-sm;
  107. max-height: 360px;
  108. width: 100%;
  109. background-color: var(--bg-light-primary);
  110. overflow: auto;
  111. border: 1px solid var(--border-primary-dark);
  112. padding: var(--spacing-04) var(--spacing-05);
  113. text-align: left;
  114. white-space: pre;
  115. font-family: monospace;
  116. }
  117. }
  118. }
  119. .horizontal-resize-handle {
  120. width: 7px !important;
  121. height: 100%;
  122. // Enable ::before and ::after pseudo-elements to position themselves correctly
  123. position: relative;
  124. background-color: var(--editor-resizer-bg-color);
  125. .custom-toggler {
  126. padding: 0;
  127. border-width: 0;
  128. // Override react-resizable-panels which sets a global * { cursor: ew-resize }
  129. cursor: pointer !important;
  130. }
  131. &.horizontal-resize-handle-enabled {
  132. &::before,
  133. &::after {
  134. // This SVG has the colour hard-coded to the current value of @ol-blue-gray-2, so if we changed @ol-blue-gray-2,
  135. // we'd have to change this SVG too
  136. content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='18' viewBox='0 0 7 18'%3E%3Cpath d='M2 0h3v3H2zM2 5h3v3H2zM2 10h3v3H2zM2 15h3v3H2z' style='fill:%239da7b7'/%3E%3C/svg%3E");
  137. display: block;
  138. position: absolute;
  139. text-align: center;
  140. left: 0;
  141. width: 7px;
  142. height: 18px;
  143. }
  144. &::before {
  145. top: 25%;
  146. }
  147. &::after {
  148. top: 75%;
  149. }
  150. }
  151. &:not(.horizontal-resize-handle-enabled) {
  152. cursor: default;
  153. }
  154. .synctex-controls {
  155. left: -8px;
  156. margin: 0;
  157. // Ensure that SyncTex controls appear in front of PDF viewer controls and logs pane
  158. z-index: 12;
  159. .synctex-control .synctex-control-icon {
  160. // Override react-resizable-panels which sets a global * { cursor: ew-resize }
  161. cursor: pointer !important;
  162. }
  163. }
  164. }
  165. .custom-toggler {
  166. position: absolute;
  167. display: flex;
  168. align-items: center;
  169. justify-content: center;
  170. width: 7px !important;
  171. height: 50px;
  172. margin-top: calc(var(--spacing-08) * -1);
  173. top: 50%;
  174. background-color: var(--editor-toggler-bg-color);
  175. &:hover,
  176. &:focus {
  177. outline: none;
  178. text-decoration: none;
  179. }
  180. // Increase hit area
  181. &::before {
  182. content: '';
  183. display: block;
  184. position: absolute;
  185. inset: 0 -3px;
  186. }
  187. &::after {
  188. font-family: FontAwesome; /* stylelint-disable-line font-family-no-missing-generic-family-keyword */
  189. -moz-osx-font-smoothing: grayscale;
  190. font-size: 65%;
  191. font-weight: bold;
  192. color: var(--white);
  193. user-select: none;
  194. pointer-events: none;
  195. }
  196. &:hover {
  197. background-color: var(--bg-accent-01);
  198. }
  199. }
  200. .custom-toggler-east::after {
  201. content: '\f105';
  202. }
  203. .custom-toggler-west::after {
  204. content: '\f104';
  205. }
  206. .custom-toggler-closed.custom-toggler-east::after {
  207. content: '\f104';
  208. }
  209. .custom-toggler-closed.custom-toggler-west::after {
  210. content: '\f105';
  211. }
  212. .vertical-resize-handle {
  213. height: 6px;
  214. background-color: var(--editor-resizer-bg-color);
  215. &.vertical-resize-handle-enabled {
  216. &:hover {
  217. background-color: var(--editor-resizer-bg-color);
  218. }
  219. }
  220. &:not(.vertical-resize-handle-enabled) {
  221. opacity: 0.5;
  222. cursor: default;
  223. }
  224. &::after {
  225. // This SVG has the colour hard-coded to the current value of @ol-blue-gray-2, so if we changed @ol-blue-gray-2,
  226. // we'd have to change this SVG too
  227. content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='6' viewBox='0 0 18 6'%3E%3Cpath d='M0 1.5h3v3H0zM5 1.5h3v3H5zM10 1.5h3v3h-3zM15 1.5h3v3h-3z' style='fill:%239da7b7'/%3E%3C/svg%3E");
  228. display: block;
  229. text-align: center;
  230. line-height: 0;
  231. }
  232. }
  233. .full-size {
  234. position: absolute;
  235. inset: 0;
  236. }
  237. .teaser-feature-icon {
  238. vertical-align: sub;
  239. }
  240. .teaser-title {
  241. margin-top: 0;
  242. text-align: center;
  243. }
  244. .teaser-refresh-label {
  245. text-align: center;
  246. }
  247. .teaser-img {
  248. display: block;
  249. max-width: 100%;
  250. height: auto;
  251. margin-bottom: var(--spacing-03);
  252. }
  253. .teaser-video-container {
  254. margin: calc(var(--bs-modal-padding) * -1) calc(var(--bs-modal-padding) * -1)
  255. var(--spacing-02) calc(var(--bs-modal-padding) * -1);
  256. overflow: hidden;
  257. }
  258. .teaser-video {
  259. width: 100%;
  260. height: auto;
  261. border-bottom: 1px solid var(--border-divider);
  262. }
  263. .loading-panel {
  264. inset: 0;
  265. text-align: center;
  266. padding-top: var(--spacing-16);
  267. background-color: var(--bg-light-secondary);
  268. }