| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | */ |
| 7 | |
| 8 | .head-commit-info { |
| 9 | margin-left: var(--halfpad); |
| 10 | } |
| 11 | .you-are-here-container { |
| 12 | display: flex; |
| 13 | gap: var(--pad); |
| 14 | align-items: center; |
| 15 | } |
| 16 | |
| 17 | .uncommitted-changes { |
| 18 | padding: var(--halfpad) 0; |
| 19 | display: flex; |
| 20 | flex-direction: column; |
| 21 | gap: var(--halfpad); |
| 22 | } |
| 23 | .conflicts-header { |
| 24 | display: flex; |
| 25 | flex-direction: column; |
| 26 | margin: var(--pad) 0; |
| 27 | } |
| 28 | .file-tree { |
| 29 | margin-top: 4px; |
| 30 | } |
| 31 | .file-tree-section { |
| 32 | margin-top: 4px; |
| 33 | } |
| 34 | .file-tree-level { |
| 35 | --file-tree-indent: calc(2 * var(--pad)); |
| 36 | margin-left: var(--file-tree-indent); |
| 37 | position: relative; |
| 38 | } |
| 39 | .changed-files > .file-tree > .file-tree-level { |
| 40 | /* Override the top-level to not have indent */ |
| 41 | margin-left: 0; |
| 42 | } |
| 43 | .file-tree-level > .changed-file { |
| 44 | margin-left: var(--halfpad); |
| 45 | } |
| 46 | .file-tree-folder-path { |
| 47 | display: flex; |
| 48 | align-items: center; |
| 49 | gap: var(--halfpad); |
| 50 | } |
| 51 | .file-tree-folder-path vscode-button::part(control) { |
| 52 | font-size: initial; |
| 53 | max-width: unset; |
| 54 | } |
| 55 | |
| 56 | .changed-files-pages-buttons { |
| 57 | display: flex; |
| 58 | align-items: center; |
| 59 | gap: var(--halfpad); |
| 60 | } |
| 61 | |
| 62 | .file-tree-level .file-tree-level:before { |
| 63 | content: ''; |
| 64 | position: absolute; |
| 65 | left: calc(var(--file-tree-indent) / -2); |
| 66 | height: 100%; |
| 67 | top: 0; |
| 68 | border-left: 1px solid var(--divider-background); |
| 69 | } |
| 70 | .file-tree-level:hover > .file-tree-level:before { |
| 71 | border-left: 1px solid var(--foreground); |
| 72 | } |
| 73 | |
| 74 | .changed-files { |
| 75 | display: flex; |
| 76 | flex-direction: column; |
| 77 | } |
| 78 | .changed-files .changed-file { |
| 79 | display: flex; |
| 80 | align-items: center; |
| 81 | gap: var(--halfpad); |
| 82 | margin-right: var(--halfpad); |
| 83 | transition: color 0.1s; |
| 84 | line-height: 25px; |
| 85 | /* when files are expanded with chunk selection, use position sticky to keep showing path at the top */ |
| 86 | position: sticky; |
| 87 | top: 0; |
| 88 | background-color: var(--changed-files-overflow-color, var(--background)); |
| 89 | z-index: 10; |
| 90 | } |
| 91 | |
| 92 | .changed-files-list .changed-file:nth-child(n + 15):last-child { |
| 93 | margin-bottom: 10px; |
| 94 | } |
| 95 | |
| 96 | .changed-files .banner { |
| 97 | padding: var(--pad); |
| 98 | margin: var(--pad) 0; |
| 99 | max-width: 500px; |
| 100 | } |
| 101 | |
| 102 | .changed-files-list-container { |
| 103 | display: flex; |
| 104 | flex-direction: column; |
| 105 | position: relative; |
| 106 | overflow-y: hidden; |
| 107 | } |
| 108 | |
| 109 | .changed-files-list { |
| 110 | --changed-files-list-height: 500px; |
| 111 | --changed-files-overflow-color: var(--background); |
| 112 | overflow-y: scroll; |
| 113 | max-height: var(--changed-files-list-height); |
| 114 | } |
| 115 | |
| 116 | .changed-file:focus-visible { |
| 117 | outline: var(--focus-border) 1px auto; |
| 118 | outline-offset: -1px; |
| 119 | } |
| 120 | |
| 121 | .changed-files-list .collapsable { |
| 122 | margin: var(--pad) 0; |
| 123 | } |
| 124 | .changed-files-list .collapsable-title { |
| 125 | user-select: none; |
| 126 | |
| 127 | font-weight: 500; |
| 128 | opacity: 0.9; |
| 129 | font-variant: all-small-caps; |
| 130 | } |
| 131 | .changed-files-list .collapsable-contents { |
| 132 | margin-left: calc(2 * var(--pad)); |
| 133 | } |
| 134 | |
| 135 | .changed-files-list:after { |
| 136 | --overflow-gradient-height: 20px; |
| 137 | display: block; |
| 138 | content: ' '; |
| 139 | width: 100%; |
| 140 | height: var(--overflow-gradient-height); |
| 141 | background: linear-gradient(transparent, var(--changed-files-overflow-color)); |
| 142 | z-index: 10; |
| 143 | position: absolute; |
| 144 | bottom: 0px; |
| 145 | left: 0; |
| 146 | top: calc(var(--changed-files-list-height) - var(--overflow-gradient-height)); |
| 147 | pointer-events: none; |
| 148 | } |
| 149 | |
| 150 | .changed-file-path { |
| 151 | display: flex; |
| 152 | align-items: center; |
| 153 | gap: var(--halfpad); |
| 154 | cursor: pointer; |
| 155 | overflow: hidden; |
| 156 | } |
| 157 | |
| 158 | .changed-file-path-text { |
| 159 | white-space: nowrap; |
| 160 | overflow: hidden; |
| 161 | text-overflow: ellipsis; |
| 162 | /* ellipsis dots on the start of the file path rather than the end */ |
| 163 | direction: rtl; |
| 164 | text-align: left; |
| 165 | } |
| 166 | .changed-file-path .tooltip-creator { |
| 167 | overflow: hidden; |
| 168 | } |
| 169 | |
| 170 | .changed-file-path:hover { |
| 171 | color: var(--highlight-foreground); |
| 172 | } |
| 173 | |
| 174 | .file-actions { |
| 175 | display: flex; |
| 176 | flex-wrap: nowrap; |
| 177 | align-items: center; |
| 178 | gap: var(--halfpad); |
| 179 | } |
| 180 | |
| 181 | .file-actions .tooltip-creator { |
| 182 | display: inline-flex; |
| 183 | } |
| 184 | |
| 185 | .file-added { |
| 186 | color: var(--scm-added-foreground); |
| 187 | } |
| 188 | .file-modified { |
| 189 | color: var(--scm-modified-foreground); |
| 190 | } |
| 191 | .file-removed { |
| 192 | color: var(--scm-removed-foreground); |
| 193 | } |
| 194 | .file-missing { |
| 195 | color: var(--scm-missing-foreground); |
| 196 | } |
| 197 | .file-unresolved { |
| 198 | color: var(--scm-modified-foreground); |
| 199 | } |
| 200 | .file-resolved { |
| 201 | color: var(--scm-added-foreground); |
| 202 | } |
| 203 | .file-ignored { |
| 204 | opacity: 0.9; |
| 205 | } |
| 206 | |
| 207 | .file-generated { |
| 208 | opacity: 0.5; |
| 209 | } |
| 210 | .file-partial { |
| 211 | opacity: 0.8; |
| 212 | } |
| 213 | |
| 214 | .show-on-hover, |
| 215 | .file-show-on-hover { |
| 216 | opacity: 0; |
| 217 | transition: opacity 0.1s; |
| 218 | } |
| 219 | .show-on-hover:focus-within, |
| 220 | .file-show-on-hover:focus-within { |
| 221 | opacity: 1; |
| 222 | } |
| 223 | .uncommitted-changes:hover .show-on-hover { |
| 224 | opacity: 1; |
| 225 | } |
| 226 | .changed-file:hover .file-show-on-hover { |
| 227 | opacity: 1; |
| 228 | } |
| 229 | .uncommitted-changes:hover vscode-button:disabled.show-on-hover { |
| 230 | opacity: 0.4; |
| 231 | } |
| 232 | /* make disabled buttons show up on hover for each changed file */ |
| 233 | :is(button, vscode-button).file-show-on-hover:disabled { |
| 234 | opacity: 0 !important; |
| 235 | } |
| 236 | .changed-file:hover :is(button, vscode-button).file-show-on-hover:disabled { |
| 237 | opacity: 0.4 !important; |
| 238 | } |
| 239 | |
| 240 | .changed-file-list .button-rows, |
| 241 | .uncommitted-changes .button-rows { |
| 242 | display: flex; |
| 243 | flex-direction: column; |
| 244 | gap: var(--halfpad); |
| 245 | } |
| 246 | |
| 247 | .changed-file-list .button-row, |
| 248 | .uncommitted-changes .button-row { |
| 249 | display: flex; |
| 250 | flex-wrap: wrap; |
| 251 | gap: var(--halfpad) var(--pad); |
| 252 | align-items: center; |
| 253 | } |
| 254 | |
| 255 | .changed-file-list .button-row { |
| 256 | padding-bottom: var(--halfpad); |
| 257 | } |
| 258 | |
| 259 | .quick-commit-inputs input[type='text'] { |
| 260 | opacity: 0; |
| 261 | transition: opacity 0.1s; |
| 262 | z-index: 1; |
| 263 | } |
| 264 | .uncommitted-changes:hover input[type='text'], |
| 265 | .uncommitted-changes input[type='text']:focus-within, |
| 266 | .quick-commit-inputs input[type='text']:not(:placeholder-shown) { |
| 267 | opacity: 1; |
| 268 | } |
| 269 | |
| 270 | .quick-commit-inputs { |
| 271 | transition: background-color 0.1s; |
| 272 | display: flex; |
| 273 | gap: var(--pad); |
| 274 | align-items: center; |
| 275 | padding: 4px; |
| 276 | margin: -4px; |
| 277 | border-radius: 4px; |
| 278 | position: relative; |
| 279 | } |
| 280 | .quick-commit-inputs:before { |
| 281 | content: ''; |
| 282 | position: absolute; |
| 283 | left: 0; |
| 284 | right: 0; |
| 285 | height: 100%; |
| 286 | width: 100%; |
| 287 | border-radius: 4px; |
| 288 | pointer-events: none; |
| 289 | opacity: 0; |
| 290 | } |
| 291 | .quick-commit-inputs:hover:before { |
| 292 | background-color: var(--button-icon-hover-background); |
| 293 | transition: opacity 0.3s; |
| 294 | opacity: 0.5; |
| 295 | } |
| 296 | |