ide-react.less 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. #ide-root {
  2. height: 100vh; /* for backwards compatibility */
  3. height: 100dvh; /* needed for mobile devices */
  4. .global-alerts {
  5. position: absolute;
  6. top: 0;
  7. left: 0;
  8. right: 0;
  9. display: flex;
  10. flex-direction: column;
  11. align-items: center;
  12. }
  13. .chat {
  14. position: relative;
  15. height: 100%;
  16. }
  17. .review-panel-wrapper {
  18. &.rp-state-overview {
  19. position: sticky;
  20. top: 0;
  21. height: 100%;
  22. }
  23. }
  24. }
  25. .ide-react-main {
  26. //migrated to SCSS
  27. height: 100%;
  28. display: flex;
  29. flex-direction: column;
  30. .toolbar.toolbar-header {
  31. position: static;
  32. flex-grow: 0;
  33. color: var(--neutral-20);
  34. }
  35. }
  36. .ide-react-body {
  37. //migrated to SCSS
  38. flex-grow: 1;
  39. background-color: @pdf-bg;
  40. overflow-y: hidden;
  41. z-index: 0;
  42. }
  43. .horizontal-resize-handle {
  44. width: @ui-resizer-size !important;
  45. height: 100%;
  46. // Enable ::before and ::after pseudo-elements to position themselves correctly
  47. position: relative;
  48. background-color: @editor-resizer-bg-color;
  49. .custom-toggler {
  50. padding: 0;
  51. border-width: 0;
  52. // Override react-resizable-panels which sets a global * { cursor: ew-resize }
  53. cursor: pointer !important;
  54. }
  55. &.horizontal-resize-handle-enabled {
  56. &::before,
  57. &::after {
  58. // This SVG has the colour hard-coded to the current value of @ol-blue-gray-2, so if we changed @ol-blue-gray-2,
  59. // we'd have to change this SVG too
  60. 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");
  61. display: block;
  62. position: absolute;
  63. text-align: center;
  64. left: 0;
  65. width: 7px;
  66. height: 18px;
  67. }
  68. &::before {
  69. top: 25%;
  70. }
  71. &::after {
  72. top: 75%;
  73. }
  74. }
  75. &:not(.horizontal-resize-handle-enabled) {
  76. cursor: default;
  77. }
  78. .synctex-controls {
  79. left: -8px;
  80. margin: 0;
  81. // Ensure that SyncTex controls appear in front of PDF viewer controls and logs pane
  82. z-index: 12;
  83. & .synctex-control .synctex-control-icon {
  84. // Override react-resizable-panels which sets a global * { cursor: ew-resize }
  85. cursor: pointer !important;
  86. }
  87. }
  88. }
  89. .vertical-resize-handle {
  90. height: 6px;
  91. background-color: @vertical-resizable-resizer-bg;
  92. &.vertical-resize-handle-enabled {
  93. &:hover {
  94. background-color: @vertical-resizable-resizer-hover-bg;
  95. }
  96. }
  97. &:not(.vertical-resize-handle-enabled) {
  98. opacity: 0.5;
  99. cursor: default;
  100. }
  101. &::after {
  102. // This SVG has the colour hard-coded to the current value of @ol-blue-gray-2, so if we changed @ol-blue-gray-2,
  103. // we'd have to change this SVG too
  104. 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");
  105. display: block;
  106. text-align: center;
  107. line-height: 0;
  108. }
  109. }
  110. .ide-react-editor-sidebar {
  111. //migrated to SCSS
  112. height: 100%;
  113. background-color: @file-tree-bg;
  114. color: var(--neutral-20);
  115. }
  116. .ide-react-symbol-palette {
  117. height: 100%;
  118. background-color: @symbol-palette-bg;
  119. color: var(--neutral-20);
  120. }
  121. .ide-react-file-tree-panel {
  122. //migrated to SCSS
  123. display: flex;
  124. flex-direction: column;
  125. // Prevent the file tree expanding beyond the boundary of the panel
  126. .file-tree {
  127. width: 100%;
  128. }
  129. }
  130. .ide-react-editor-panel {
  131. display: flex;
  132. flex-direction: column;
  133. }
  134. // Ensure an element with class "full-size", such as the binary file view, stays within the bounds of the panel
  135. .ide-react-panel {
  136. position: relative;
  137. container-type: size;
  138. }
  139. // Styles for placeholder elements that will eventually be replaced
  140. .ide-react-placeholder-chat {
  141. background-color: var(--editor-toolbar-bg);
  142. color: var(--neutral-20);
  143. height: 100%;
  144. }
  145. .ide-panel-group-resizing {
  146. background-color: white;
  147. // Hide panel contents while resizing
  148. .ide-react-editor-content,
  149. .pdf {
  150. display: none !important;
  151. }
  152. }