ide.scss 7.4 KB

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