xterm.css 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. /*
  2. * Copyright (C) 2024-present Puter Technologies Inc.
  3. *
  4. * This file is part of Puter.
  5. *
  6. * Puter is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as published
  8. * by the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. /**
  20. * Copyright (c) 2014 The xterm.js authors. All rights reserved.
  21. * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
  22. * https://github.com/chjj/term.js
  23. * @license MIT
  24. *
  25. * Permission is hereby granted, free of charge, to any person obtaining a copy
  26. * of this software and associated documentation files (the "Software"), to deal
  27. * in the Software without restriction, including without limitation the rights
  28. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  29. * copies of the Software, and to permit persons to whom the Software is
  30. * furnished to do so, subject to the following conditions:
  31. *
  32. * The above copyright notice and this permission notice shall be included in
  33. * all copies or substantial portions of the Software.
  34. *
  35. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  36. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  37. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  38. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  39. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  40. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  41. * THE SOFTWARE.
  42. *
  43. * Originally forked from (with the author's permission):
  44. * Fabrice Bellard's javascript vt100 for jslinux:
  45. * http://bellard.org/jslinux/
  46. * Copyright (c) 2011 Fabrice Bellard
  47. * The original design remains. The terminal itself
  48. * has been extended to include xterm CSI codes, among
  49. * other features.
  50. */
  51. /**
  52. * Default styles for xterm.js
  53. */
  54. .xterm {
  55. cursor: text;
  56. position: relative;
  57. user-select: none;
  58. -ms-user-select: none;
  59. -webkit-user-select: none;
  60. }
  61. .xterm.focus,
  62. .xterm:focus {
  63. outline: none;
  64. }
  65. .xterm .xterm-helpers {
  66. position: absolute;
  67. top: 0;
  68. /**
  69. * The z-index of the helpers must be higher than the canvases in order for
  70. * IMEs to appear on top.
  71. */
  72. z-index: 5;
  73. }
  74. .xterm .xterm-helper-textarea {
  75. padding: 0;
  76. border: 0;
  77. margin: 0;
  78. /* Move textarea out of the screen to the far left, so that the cursor is not visible */
  79. position: absolute;
  80. opacity: 0;
  81. left: -9999em;
  82. top: 0;
  83. width: 0;
  84. height: 0;
  85. z-index: -5;
  86. /** Prevent wrapping so the IME appears against the textarea at the correct position */
  87. white-space: nowrap;
  88. overflow: hidden;
  89. resize: none;
  90. }
  91. .xterm .composition-view {
  92. /* TODO: Composition position got messed up somewhere */
  93. background: #000;
  94. color: #FFF;
  95. display: none;
  96. position: absolute;
  97. white-space: nowrap;
  98. z-index: 1;
  99. }
  100. .xterm .composition-view.active {
  101. display: block;
  102. }
  103. .xterm .xterm-viewport {
  104. /* On OS X this is required in order for the scroll bar to appear fully opaque */
  105. background-color: #000;
  106. overflow-y: scroll;
  107. cursor: default;
  108. position: absolute;
  109. right: 0;
  110. left: 0;
  111. top: 0;
  112. bottom: 0;
  113. }
  114. .xterm .xterm-screen {
  115. position: relative;
  116. }
  117. .xterm .xterm-screen canvas {
  118. position: absolute;
  119. left: 0;
  120. top: 0;
  121. }
  122. .xterm .xterm-scroll-area {
  123. visibility: hidden;
  124. }
  125. .xterm-char-measure-element {
  126. display: inline-block;
  127. visibility: hidden;
  128. position: absolute;
  129. top: 0;
  130. left: -9999em;
  131. line-height: normal;
  132. }
  133. .xterm.enable-mouse-events {
  134. /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
  135. cursor: default;
  136. }
  137. .xterm.xterm-cursor-pointer,
  138. .xterm .xterm-cursor-pointer {
  139. cursor: pointer;
  140. }
  141. .xterm.column-select.focus {
  142. /* Column selection mode */
  143. cursor: crosshair;
  144. }
  145. .xterm .xterm-accessibility:not(.debug),
  146. .xterm .xterm-message {
  147. position: absolute;
  148. left: 0;
  149. top: 0;
  150. bottom: 0;
  151. right: 0;
  152. z-index: 10;
  153. color: transparent;
  154. pointer-events: none;
  155. }
  156. .xterm .xterm-accessibility-tree:not(.debug) *::selection {
  157. color: transparent;
  158. }
  159. .xterm .xterm-accessibility-tree {
  160. user-select: text;
  161. white-space: pre;
  162. }
  163. .xterm .live-region {
  164. position: absolute;
  165. left: -9999px;
  166. width: 1px;
  167. height: 1px;
  168. overflow: hidden;
  169. }
  170. .xterm-dim {
  171. /* Dim should not apply to background, so the opacity of the foreground color is applied
  172. * explicitly in the generated class and reset to 1 here */
  173. opacity: 1 !important;
  174. }
  175. .xterm-underline-1 { text-decoration: underline; }
  176. .xterm-underline-2 { text-decoration: double underline; }
  177. .xterm-underline-3 { text-decoration: wavy underline; }
  178. .xterm-underline-4 { text-decoration: dotted underline; }
  179. .xterm-underline-5 { text-decoration: dashed underline; }
  180. .xterm-overline {
  181. text-decoration: overline;
  182. }
  183. .xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
  184. .xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
  185. .xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
  186. .xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
  187. .xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }
  188. .xterm-strikethrough {
  189. text-decoration: line-through;
  190. }
  191. .xterm-screen .xterm-decoration-container .xterm-decoration {
  192. z-index: 6;
  193. position: absolute;
  194. }
  195. .xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
  196. z-index: 7;
  197. }
  198. .xterm-decoration-overview-ruler {
  199. z-index: 8;
  200. position: absolute;
  201. top: 0;
  202. right: 0;
  203. pointer-events: none;
  204. }
  205. .xterm-decoration-top {
  206. z-index: 2;
  207. position: relative;
  208. }