ide.scss 6.9 KB

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