ide.scss 6.6 KB

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