index.css 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. textarea:focus {
  2. outline: 1.5px solid var(--vscode-focusBorder, #007fd4);
  3. }
  4. vscode-button::part(control):focus {
  5. outline: none;
  6. }
  7. /*
  8. Use vscode native scrollbar styles
  9. https://github.com/gitkraken/vscode-gitlens/blob/b1d71d4844523e8b2ef16f9e007068e91f46fd88/src/webviews/apps/home/home.scss
  10. */
  11. html {
  12. height: 100%;
  13. -webkit-font-smoothing: antialiased;
  14. -moz-osx-font-smoothing: grayscale;
  15. }
  16. body {
  17. margin: 0;
  18. }
  19. body, body * {
  20. line-height: 1.5em;
  21. }
  22. body.scrollable,
  23. .scrollable,
  24. body.code-block-scrollable,
  25. .code-block-scrollable {
  26. border-color: transparent;
  27. transition: border-color 0.7s linear;
  28. }
  29. body:hover.scrollable,
  30. body:hover .scrollable,
  31. body:focus-within.scrollable,
  32. body:focus-within .scrollable,
  33. body:hover.code-block-scrollable,
  34. body:hover .code-block-scrollable,
  35. body:focus-within.code-block-scrollable,
  36. body:focus-within .code-block-scrollable {
  37. border-color: var(--vscode-scrollbarSlider-background);
  38. transition: none;
  39. }
  40. .scrollable::-webkit-scrollbar-corner {
  41. background-color: transparent !important;
  42. }
  43. .scrollable::-webkit-scrollbar-thumb {
  44. background-color: transparent;
  45. border-color: inherit;
  46. border-right-style: inset;
  47. border-right-width: calc(100vw + 100vh);
  48. border-radius: unset !important;
  49. }
  50. .scrollable::-webkit-scrollbar-thumb:hover {
  51. border-color: var(--vscode-scrollbarSlider-hoverBackground);
  52. }
  53. .scrollable::-webkit-scrollbar-thumb:active {
  54. border-color: var(--vscode-scrollbarSlider-activeBackground);
  55. }
  56. /*
  57. Fix VSCode ignoring webkit scrollbar modifiers
  58. https://github.com/microsoft/vscode/issues/213045
  59. */
  60. @supports selector(::-webkit-scrollbar) {
  61. html {
  62. scrollbar-color: unset;
  63. }
  64. }
  65. /*
  66. The above scrollbar styling uses some transparent background color magic to accomplish its animation. However this doesn't play nicely with SyntaxHighlighter, so we need to set a background color for the code blocks' horizontal scrollbar. This actually has the unintended consequence of always showing the scrollbar which I prefer since it makes it more obvious that there is more content to scroll to.
  67. */
  68. .code-block-scrollable::-webkit-scrollbar-track {
  69. background: transparent;
  70. }
  71. .code-block-scrollable::-webkit-scrollbar-thumb {
  72. background-color: var(--vscode-scrollbarSlider-background);
  73. border-radius: 5px;
  74. border: 2px solid transparent;
  75. background-clip: content-box;
  76. }
  77. .code-block-scrollable::-webkit-scrollbar-thumb:hover {
  78. background-color: var(--vscode-scrollbarSlider-hoverBackground);
  79. }
  80. .code-block-scrollable::-webkit-scrollbar-thumb:active {
  81. background-color: var(--vscode-scrollbarSlider-activeBackground);
  82. }
  83. .code-block-scrollable::-webkit-scrollbar-corner {
  84. background-color: transparent;
  85. }
  86. /*
  87. Dropdown label
  88. https://github.com/microsoft/vscode-webview-ui-toolkit/tree/main/src/dropdown#with-label
  89. */
  90. .dropdown-container {
  91. box-sizing: border-box;
  92. display: flex;
  93. flex-flow: column nowrap;
  94. align-items: flex-start;
  95. justify-content: flex-start;
  96. }
  97. .dropdown-container label {
  98. display: block;
  99. color: var(--vscode-foreground);
  100. cursor: pointer;
  101. font-size: var(--vscode-font-size);
  102. line-height: normal;
  103. margin-bottom: 2px;
  104. }
  105. /* Fix scrollbar in dropdown */
  106. vscode-dropdown::part(listbox) {
  107. border-color: var(--vscode-scrollbarSlider-background);
  108. transition: none;
  109. scrollbar-color: var(--vscode-scrollbarSlider-background) transparent;
  110. }
  111. /* Faded icon buttons in textfields */
  112. .input-icon-button {
  113. cursor: pointer;
  114. opacity: 0.65;
  115. }
  116. .input-icon-button:hover {
  117. opacity: 1;
  118. }
  119. .input-icon-button.disabled {
  120. cursor: not-allowed;
  121. opacity: 0.4;
  122. }
  123. .input-icon-button.disabled:hover {
  124. opacity: 0.4;
  125. }
  126. /* Context mentions */
  127. .mention-context-textarea-highlight {
  128. background-color: color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  129. border-radius: 3px;
  130. box-shadow: 0 0 0 0.5px color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  131. color: transparent;
  132. /* padding: 0.5px;
  133. margin: -0.5px;
  134. position: relative;
  135. bottom: -0.5px; */
  136. }
  137. .mention-context-highlight {
  138. background-color: color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  139. border-radius: 3px;
  140. }
  141. .mention-context-highlight-with-shadow {
  142. background-color: color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  143. border-radius: 3px;
  144. box-shadow: 0 0 0 0.5px color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  145. }