ide.scss 7.2 KB

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