index.css 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. line-height: 1.25;
  19. }
  20. body.scrollable,
  21. .scrollable,
  22. body.code-block-scrollable,
  23. .code-block-scrollable {
  24. border-color: transparent;
  25. transition: border-color 0.7s linear;
  26. }
  27. body:hover.scrollable,
  28. body:hover .scrollable,
  29. body:focus-within.scrollable,
  30. body:focus-within .scrollable,
  31. body:hover.code-block-scrollable,
  32. body:hover .code-block-scrollable,
  33. body:focus-within.code-block-scrollable,
  34. body:focus-within .code-block-scrollable {
  35. border-color: var(--vscode-scrollbarSlider-background);
  36. transition: none;
  37. }
  38. .scrollable::-webkit-scrollbar-corner {
  39. background-color: transparent !important;
  40. }
  41. .scrollable::-webkit-scrollbar-thumb {
  42. background-color: transparent;
  43. border-color: inherit;
  44. border-right-style: inset;
  45. border-right-width: calc(100vw + 100vh);
  46. border-radius: unset !important;
  47. }
  48. .scrollable::-webkit-scrollbar-thumb:hover {
  49. border-color: var(--vscode-scrollbarSlider-hoverBackground);
  50. }
  51. .scrollable::-webkit-scrollbar-thumb:active {
  52. border-color: var(--vscode-scrollbarSlider-activeBackground);
  53. }
  54. /*
  55. Fix VSCode ignoring webkit scrollbar modifiers
  56. https://github.com/microsoft/vscode/issues/213045
  57. */
  58. @supports selector(::-webkit-scrollbar) {
  59. html {
  60. scrollbar-color: unset;
  61. }
  62. }
  63. /*
  64. 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.
  65. */
  66. .code-block-scrollable::-webkit-scrollbar-track {
  67. background: transparent;
  68. }
  69. .code-block-scrollable::-webkit-scrollbar-thumb {
  70. background-color: var(--vscode-scrollbarSlider-background);
  71. border-radius: 5px;
  72. border: 2px solid transparent;
  73. background-clip: content-box;
  74. }
  75. .code-block-scrollable::-webkit-scrollbar-thumb:hover {
  76. background-color: var(--vscode-scrollbarSlider-hoverBackground);
  77. }
  78. .code-block-scrollable::-webkit-scrollbar-thumb:active {
  79. background-color: var(--vscode-scrollbarSlider-activeBackground);
  80. }
  81. .code-block-scrollable::-webkit-scrollbar-corner {
  82. background-color: transparent;
  83. }
  84. /*
  85. Dropdown label
  86. https://github.com/microsoft/vscode-webview-ui-toolkit/tree/main/src/dropdown#with-label
  87. */
  88. .dropdown-container {
  89. box-sizing: border-box;
  90. display: flex;
  91. flex-flow: column nowrap;
  92. align-items: flex-start;
  93. justify-content: flex-start;
  94. }
  95. .dropdown-container label {
  96. display: block;
  97. color: var(--vscode-foreground);
  98. cursor: pointer;
  99. font-size: var(--vscode-font-size);
  100. line-height: normal;
  101. margin-bottom: 2px;
  102. }
  103. /* Fix scrollbar in dropdown */
  104. vscode-dropdown::part(listbox) {
  105. border-color: var(--vscode-scrollbarSlider-background);
  106. transition: none;
  107. scrollbar-color: var(--vscode-scrollbarSlider-background) transparent;
  108. }
  109. /* Faded icon buttons in textfields */
  110. .input-icon-button {
  111. cursor: pointer;
  112. opacity: 0.65;
  113. }
  114. .input-icon-button:hover {
  115. opacity: 1;
  116. }
  117. .input-icon-button.disabled {
  118. cursor: not-allowed;
  119. opacity: 0.4;
  120. }
  121. .input-icon-button.disabled:hover {
  122. opacity: 0.4;
  123. }
  124. /* Context mentions */
  125. .mention-context-textarea-highlight {
  126. background-color: color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  127. border-radius: 3px;
  128. box-shadow: 0 0 0 0.5px color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  129. color: transparent;
  130. /* padding: 0.5px;
  131. margin: -0.5px;
  132. position: relative;
  133. bottom: -0.5px; */
  134. }
  135. .mention-context-highlight {
  136. background-color: color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  137. border-radius: 3px;
  138. }
  139. .mention-context-highlight-with-shadow {
  140. background-color: color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  141. border-radius: 3px;
  142. box-shadow: 0 0 0 0.5px color-mix(in srgb, var(--vscode-badge-foreground) 30%, transparent);
  143. }