ide.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  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. .ide-panel-group-resizing {
  120. background-color: var(--white);
  121. // Hide panel contents while resizing
  122. .ide-react-editor-content,
  123. .pdf {
  124. display: none !important;
  125. }
  126. }
  127. .modal.lock-editor-modal {
  128. display: flex !important;
  129. background-color: rgba($bg-dark-primary, 0.3);
  130. overflow-y: hidden;
  131. pointer-events: none;
  132. .modal-dialog {
  133. top: 25px;
  134. }
  135. }
  136. .out-of-sync-modal {
  137. .text-preview {
  138. margin-top: var(--spacing-05);
  139. .scroll-container {
  140. @include body-sm;
  141. max-height: 360px;
  142. width: 100%;
  143. background-color: var(--bg-light-primary);
  144. overflow: auto;
  145. border: 1px solid var(--border-primary-dark);
  146. padding: var(--spacing-04) var(--spacing-05);
  147. text-align: left;
  148. white-space: pre;
  149. font-family: monospace;
  150. }
  151. }
  152. }
  153. .horizontal-resize-handle {
  154. width: 7px !important;
  155. height: 100%;
  156. // Enable ::before and ::after pseudo-elements to position themselves correctly
  157. position: relative;
  158. background-color: var(--editor-resizer-bg-color);
  159. .custom-toggler {
  160. padding: 0;
  161. border-width: 0;
  162. // Override react-resizable-panels which sets a global * { cursor: ew-resize }
  163. cursor: pointer !important;
  164. }
  165. &.horizontal-resize-handle-enabled {
  166. &::before,
  167. &::after {
  168. // This SVG has the colour hard-coded to the current value of @ol-blue-gray-2, so if we changed @ol-blue-gray-2,
  169. // we'd have to change this SVG too
  170. 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");
  171. display: block;
  172. position: absolute;
  173. text-align: center;
  174. left: 0;
  175. width: 7px;
  176. height: 18px;
  177. }
  178. &::before {
  179. top: 25%;
  180. }
  181. &::after {
  182. top: 75%;
  183. }
  184. }
  185. &:not(.horizontal-resize-handle-enabled) {
  186. cursor: default;
  187. }
  188. .synctex-controls {
  189. left: -8px;
  190. margin: 0;
  191. // Ensure that SyncTex controls appear in front of PDF viewer controls and logs pane
  192. z-index: 12;
  193. .synctex-control .synctex-control-icon {
  194. // Override react-resizable-panels which sets a global * { cursor: ew-resize }
  195. cursor: pointer !important;
  196. }
  197. }
  198. }
  199. .custom-toggler {
  200. position: absolute;
  201. display: flex;
  202. align-items: center;
  203. justify-content: center;
  204. width: 7px !important;
  205. height: 50px;
  206. margin-top: calc(var(--spacing-08) * -1);
  207. top: 50%;
  208. background-color: var(--editor-toggler-bg-color);
  209. .material-symbols {
  210. font-size: var(--font-size-02);
  211. -moz-osx-font-smoothing: grayscale;
  212. font-weight: bold;
  213. color: var(--white);
  214. user-select: none;
  215. pointer-events: none;
  216. }
  217. &:hover,
  218. &:focus {
  219. outline: none;
  220. text-decoration: none;
  221. }
  222. // Increase hit area
  223. &::before {
  224. content: '';
  225. display: block;
  226. position: absolute;
  227. inset: 0 -3px;
  228. }
  229. &:hover {
  230. background-color: var(--bg-accent-01);
  231. }
  232. }
  233. .vertical-resize-handle {
  234. height: 6px;
  235. background-color: var(--editor-resizer-bg-color);
  236. &.vertical-resize-handle-enabled {
  237. &:hover {
  238. background-color: var(--editor-resizer-bg-color);
  239. }
  240. }
  241. &:not(.vertical-resize-handle-enabled) {
  242. opacity: 0.5;
  243. cursor: default;
  244. }
  245. &::after {
  246. // This SVG has the colour hard-coded to the current value of @ol-blue-gray-2, so if we changed @ol-blue-gray-2,
  247. // we'd have to change this SVG too
  248. 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");
  249. display: block;
  250. text-align: center;
  251. line-height: 0;
  252. }
  253. }
  254. .full-size {
  255. position: absolute;
  256. inset: 0;
  257. }
  258. .teaser-feature-icon {
  259. vertical-align: sub;
  260. }
  261. .teaser-title {
  262. margin-top: 0;
  263. text-align: center;
  264. }
  265. .teaser-refresh-label {
  266. text-align: center;
  267. }
  268. .teaser-img {
  269. display: block;
  270. max-width: 100%;
  271. height: auto;
  272. margin-bottom: var(--spacing-03);
  273. }
  274. .teaser-video-container {
  275. margin: calc(var(--bs-modal-padding) * -1) calc(var(--bs-modal-padding) * -1)
  276. var(--spacing-02) calc(var(--bs-modal-padding) * -1);
  277. overflow: hidden;
  278. }
  279. .teaser-video {
  280. width: 100%;
  281. height: auto;
  282. border-bottom: 1px solid var(--border-divider);
  283. }
  284. .loading-panel {
  285. inset: 0;
  286. text-align: center;
  287. padding-top: var(--spacing-16);
  288. background-color: var(--bg-light-secondary);
  289. }