ide.scss 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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. }
  54. .global-alerts {
  55. height: 0;
  56. margin-top: var(--spacing-01);
  57. text-align: center;
  58. [role='alert'] {
  59. text-align: left;
  60. min-width: 400px;
  61. position: relative;
  62. z-index: 20;
  63. }
  64. }
  65. .ide-react-editor-sidebar {
  66. background-color: var(--file-tree-bg);
  67. height: 100%;
  68. color: var(--content-secondary-dark);
  69. position: relative;
  70. }
  71. .ide-react-body {
  72. flex-grow: 1;
  73. background-color: var(--bg-light-secondary);
  74. overflow-y: hidden;
  75. z-index: 0;
  76. }
  77. .ide-react-main {
  78. flex: 1;
  79. overflow-y: hidden;
  80. display: flex;
  81. flex-direction: column;
  82. .toolbar.toolbar-header {
  83. position: static;
  84. flex-grow: 0;
  85. color: var(--neutral-20);
  86. }
  87. }
  88. .ide-react-symbol-palette {
  89. height: 100%;
  90. background-color: var(--bg-dark-tertiary);
  91. color: var(--neutral-20);
  92. }
  93. .ide-react-editor-panel {
  94. display: flex;
  95. flex-direction: column;
  96. }
  97. // Ensure an element with class "full-size", such as the binary file view, stays within the bounds of the panel
  98. .ide-react-panel {
  99. position: relative;
  100. container-type: size;
  101. }
  102. .ide-panel-group-resizing {
  103. background-color: var(--white);
  104. // Hide panel contents while resizing
  105. .ide-react-editor-content,
  106. .pdf {
  107. display: none !important;
  108. }
  109. }
  110. .modal.lock-editor-modal {
  111. display: flex !important;
  112. background-color: rgba($bg-dark-primary, 0.3);
  113. overflow-y: hidden;
  114. pointer-events: none;
  115. .modal-dialog {
  116. top: 25px;
  117. }
  118. }
  119. .out-of-sync-modal {
  120. .text-preview {
  121. margin-top: var(--spacing-05);
  122. .scroll-container {
  123. @include body-sm;
  124. max-height: 360px;
  125. width: 100%;
  126. background-color: var(--bg-light-primary);
  127. overflow: auto;
  128. border: 1px solid var(--border-primary-dark);
  129. padding: var(--spacing-04) var(--spacing-05);
  130. text-align: left;
  131. white-space: pre;
  132. font-family: monospace;
  133. }
  134. }
  135. }
  136. .horizontal-resize-handle {
  137. width: 7px !important;
  138. height: 100%;
  139. // Enable ::before and ::after pseudo-elements to position themselves correctly
  140. position: relative;
  141. background-color: var(--editor-resizer-bg-color);
  142. .custom-toggler {
  143. padding: 0;
  144. border-width: 0;
  145. // Override react-resizable-panels which sets a global * { cursor: ew-resize }
  146. cursor: pointer !important;
  147. }
  148. &.horizontal-resize-handle-enabled {
  149. &::before,
  150. &::after {
  151. // This SVG has the colour hard-coded to the current value of @ol-blue-gray-2, so if we changed @ol-blue-gray-2,
  152. // we'd have to change this SVG too
  153. 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");
  154. display: block;
  155. position: absolute;
  156. text-align: center;
  157. left: 0;
  158. width: 7px;
  159. height: 18px;
  160. }
  161. &::before {
  162. top: 25%;
  163. }
  164. &::after {
  165. top: 75%;
  166. }
  167. }
  168. &:not(.horizontal-resize-handle-enabled) {
  169. cursor: default;
  170. }
  171. .synctex-controls {
  172. left: -8px;
  173. margin: 0;
  174. // Ensure that SyncTex controls appear in front of PDF viewer controls and logs pane
  175. z-index: 12;
  176. .synctex-control .synctex-control-icon {
  177. // Override react-resizable-panels which sets a global * { cursor: ew-resize }
  178. cursor: pointer !important;
  179. }
  180. }
  181. }
  182. .custom-toggler {
  183. position: absolute;
  184. display: flex;
  185. align-items: center;
  186. justify-content: center;
  187. width: 7px !important;
  188. height: 50px;
  189. margin-top: calc(var(--spacing-08) * -1);
  190. top: 50%;
  191. background-color: var(--editor-toggler-bg-color);
  192. &:hover,
  193. &:focus {
  194. outline: none;
  195. text-decoration: none;
  196. }
  197. // Increase hit area
  198. &::before {
  199. content: '';
  200. display: block;
  201. position: absolute;
  202. inset: 0 -3px;
  203. }
  204. &::after {
  205. font-family: FontAwesome; /* stylelint-disable-line font-family-no-missing-generic-family-keyword */
  206. -moz-osx-font-smoothing: grayscale;
  207. font-size: 65%;
  208. font-weight: bold;
  209. color: var(--white);
  210. user-select: none;
  211. pointer-events: none;
  212. }
  213. &:hover {
  214. background-color: var(--bg-accent-01);
  215. }
  216. }
  217. .custom-toggler-east::after {
  218. content: '\f105';
  219. }
  220. .custom-toggler-west::after {
  221. content: '\f104';
  222. }
  223. .custom-toggler-closed.custom-toggler-east::after {
  224. content: '\f104';
  225. }
  226. .custom-toggler-closed.custom-toggler-west::after {
  227. content: '\f105';
  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. }