| 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 | .commit-info-view { |
| 9 | display: flex; |
| 10 | flex-direction: column; |
| 11 | height: 100%; |
| 12 | |
| 13 | --toolbar-fade-height: 30px; |
| 14 | } |
| 15 | |
| 16 | .commit-info-view-main-content { |
| 17 | overflow-y: auto; |
| 18 | padding: var(--pad); |
| 19 | flex-grow: 1; |
| 20 | padding-bottom: var(--toolbar-fade-height); |
| 21 | } |
| 22 | |
| 23 | .commit-info-view-multi-commit { |
| 24 | display: flex; |
| 25 | flex-direction: column; |
| 26 | } |
| 27 | |
| 28 | .commit-info-view-multi-commit .commit-list { |
| 29 | display: flex; |
| 30 | flex-direction: column; |
| 31 | margin-left: calc(4 * var(--pad)); |
| 32 | gap: var(--halfpad); |
| 33 | flex-grow: 1; |
| 34 | } |
| 35 | |
| 36 | .commit-info-view-multi-commit .commit-list-container { |
| 37 | display: flex; |
| 38 | flex-direction: column; |
| 39 | gap: var(--pad); |
| 40 | margin: var(--pad); |
| 41 | } |
| 42 | |
| 43 | .commit-info-view-multi-commit .commit-list-header { |
| 44 | text-align: center; |
| 45 | display: flex; |
| 46 | align-items: center; |
| 47 | gap: var(--halfpad); |
| 48 | margin: var(--pad); |
| 49 | } |
| 50 | |
| 51 | .commit-info-view vscode-text-area, |
| 52 | .commit-info-view vscode-text-field { |
| 53 | width: 100%; |
| 54 | margin: var(--halfpad) 0; |
| 55 | } |
| 56 | |
| 57 | .commit-info-rendered-title { |
| 58 | cursor: pointer; |
| 59 | font-weight: bold; |
| 60 | display: flex; |
| 61 | align-items: center; |
| 62 | gap: var(--pad); |
| 63 | /* add padding then undo with margin so focus state outline is less cramped */ |
| 64 | padding: var(--halfpad); |
| 65 | margin: calc(-1 * var(--halfpad)); |
| 66 | } |
| 67 | |
| 68 | .commit-info-title-wrapper { |
| 69 | display: flex; |
| 70 | align-items: center; |
| 71 | gap: var(--pad); |
| 72 | } |
| 73 | |
| 74 | .commit-info-title-wrapper:hover .hover-edit-button, |
| 75 | .commit-info-title-wrapper:focus-within .hover-edit-button { |
| 76 | opacity: 1; |
| 77 | } |
| 78 | |
| 79 | .commit-info-rendered-field { |
| 80 | cursor: pointer; |
| 81 | white-space: pre-wrap; |
| 82 | margin-bottom: var(--pad); |
| 83 | transition: background-color 0.1s; |
| 84 | border-radius: var(--pad); |
| 85 | padding-top: 0; |
| 86 | } |
| 87 | |
| 88 | .commit-info-rendered-textarea, |
| 89 | .commit-info-rendered-custom { |
| 90 | cursor: pointer; |
| 91 | white-space: pre-wrap; |
| 92 | transition: background-color 0.1s; |
| 93 | border-radius: var(--pad); |
| 94 | margin-inline: calc(-1 * var(--pad)); |
| 95 | margin-bottom: var(--pad); |
| 96 | padding: var(--pad); |
| 97 | word-break: break-word; |
| 98 | } |
| 99 | |
| 100 | .commit-info-rendered-field:focus-visible, |
| 101 | .commit-info-rendered-title:focus-visible, |
| 102 | .commit-info-rendered-textarea:focus-visible, |
| 103 | .commit-info-rendered-custom:focus-visible { |
| 104 | outline: var(--focus-border) 1px auto; |
| 105 | outline-offset: -1px; |
| 106 | } |
| 107 | |
| 108 | .commit-info-section .see-more-container { |
| 109 | margin: calc(-1 * var(--pad)); |
| 110 | margin-left: 0; |
| 111 | margin-bottom: var(--pad); |
| 112 | } |
| 113 | |
| 114 | .commit-info-rendered-textarea:hover, |
| 115 | .commit-info-rendered-field:hover, |
| 116 | .commit-info-rendered-custom:hover { |
| 117 | background: var(--tooltip-background); |
| 118 | } |
| 119 | |
| 120 | .commit-info-actions-bar { |
| 121 | display: flex; |
| 122 | flex-direction: row; |
| 123 | gap: var(--pad); |
| 124 | flex-wrap: wrap; |
| 125 | border-top: 1px solid var(--panel-view-border); |
| 126 | padding: var(--pad); |
| 127 | justify-content: space-between; |
| 128 | } |
| 129 | .commit-info-actions-bar-left { |
| 130 | display: flex; |
| 131 | flex-direction: row; |
| 132 | gap: var(--pad); |
| 133 | justify-content: flex-start; |
| 134 | } |
| 135 | .commit-info-actions-bar-right { |
| 136 | display: flex; |
| 137 | flex-direction: row; |
| 138 | gap: var(--pad); |
| 139 | margin-left: auto; |
| 140 | flex-wrap: wrap; |
| 141 | justify-content: flex-end; |
| 142 | } |
| 143 | .commit-info-actions-bar-row { |
| 144 | width: 100%; |
| 145 | display: flex; |
| 146 | justify-content: flex-end; |
| 147 | flex-direction: row; |
| 148 | gap: var(--pad); |
| 149 | margin-left: auto; |
| 150 | } |
| 151 | |
| 152 | .commit-info-actions-bar-row { |
| 153 | display: flex; |
| 154 | flex-direction: row; |
| 155 | width: 100%; |
| 156 | align-items: center; |
| 157 | justify-content: flex-end; |
| 158 | } |
| 159 | |
| 160 | .commit-info-view-toolbar-top { |
| 161 | padding: 0 var(--pad); |
| 162 | border-bottom: 1px solid var(--panel-view-border); |
| 163 | display: flex; |
| 164 | flex-direction: row; |
| 165 | gap: var(--pad); |
| 166 | justify-content: flex-end; |
| 167 | } |
| 168 | |
| 169 | .commit-info-section.commit-info-title-field-section { |
| 170 | margin-top: 0; |
| 171 | } |
| 172 | |
| 173 | .commit-info-view-toolbar-bottom:before { |
| 174 | /* fade to bg color just above toolbar, to hint that you can keep scrolling */ |
| 175 | background: linear-gradient(0deg, var(--background), transparent); |
| 176 | width: 100%; |
| 177 | height: var(--toolbar-fade-height); |
| 178 | display: block; |
| 179 | position: absolute; |
| 180 | content: ' '; |
| 181 | margin-top: calc(-1 * var(--toolbar-fade-height)); |
| 182 | opacity: 0.8; |
| 183 | pointer-events: none; |
| 184 | } |
| 185 | |
| 186 | .commit-info-view-multi-commit .commit-list .commit-details:before { |
| 187 | display: none; |
| 188 | } |
| 189 | |
| 190 | .commit-info-field-buttons { |
| 191 | display: flex; |
| 192 | align-items: center; |
| 193 | gap: 0; |
| 194 | } |
| 195 | |
| 196 | .hover-edit-button { |
| 197 | opacity: 0; |
| 198 | transition: |
| 199 | opacity 0.1s, |
| 200 | background-color 0.1s, |
| 201 | transform 0.1s; |
| 202 | display: flex; |
| 203 | cursor: pointer; |
| 204 | border-radius: var(--halfpad); |
| 205 | background: none; |
| 206 | border: none; |
| 207 | padding: 2px; |
| 208 | color: inherit; |
| 209 | } |
| 210 | .hover-edit-button:hover { |
| 211 | transform: scale(1.1); |
| 212 | } |
| 213 | .commit-info-section:focus-within .hover-edit-button, |
| 214 | .commit-info-section:hover .hover-edit-button { |
| 215 | opacity: 1; |
| 216 | } |
| 217 | |
| 218 | .commit-info-small-title { |
| 219 | font-weight: bold; |
| 220 | text-transform: uppercase; |
| 221 | font-size: 90%; |
| 222 | opacity: 0.9; |
| 223 | display: flex; |
| 224 | align-items: center; |
| 225 | gap: var(--halfpad); |
| 226 | } |
| 227 | |
| 228 | .commit-info-section { |
| 229 | margin: var(--pad); |
| 230 | margin-top: calc(2 * var(--pad)); |
| 231 | } |
| 232 | |
| 233 | .commit-info-title-byline { |
| 234 | padding: 5px; |
| 235 | margin: 0 var(--halfpad); |
| 236 | display: flex; |
| 237 | flex-wrap: nowrap; |
| 238 | gap: var(--halfpad); |
| 239 | align-items: center; |
| 240 | } |
| 241 | |
| 242 | .overflow-ellipsis { |
| 243 | text-overflow: ellipsis; |
| 244 | overflow: hidden; |
| 245 | white-space: nowrap; |
| 246 | flex-shrink: 0; |
| 247 | } |
| 248 | .overflow-ellipsis.overflow-shrink { |
| 249 | flex-shrink: 1; |
| 250 | } |
| 251 | |
| 252 | .commit-info-title-byline .you-are-here-container { |
| 253 | margin-right: 5px; |
| 254 | flex-shrink: 0; |
| 255 | } |
| 256 | |
| 257 | .commit-info-title-byline .tooltip-creator { |
| 258 | display: inline; |
| 259 | } |
| 260 | |
| 261 | .commit-info-view .empty-description { |
| 262 | display: flex; |
| 263 | gap: var(--halfpad); |
| 264 | align-items: center; |
| 265 | margin: var(--halfpad); |
| 266 | } |
| 267 | |
| 268 | .commit-info-view .changed-file-list { |
| 269 | padding: var(--halfpad) 0; |
| 270 | } |
| 271 | |
| 272 | .commit-info-confirm-modal-paragraphs { |
| 273 | display: flex; |
| 274 | gap: var(--pad); |
| 275 | flex-direction: column; |
| 276 | } |
| 277 | |
| 278 | .commit-info-view .image-drop-zone { |
| 279 | margin: var(--halfpad) 0; |
| 280 | } |
| 281 | .commit-info-view .image-drop-zone vscode-text-area { |
| 282 | margin: 0; |
| 283 | } |
| 284 | |
| 285 | .commit-info-field { |
| 286 | position: relative; |
| 287 | } |
| 288 | .text-area-toolbar { |
| 289 | display: flex; |
| 290 | flex-direction: row; |
| 291 | align-items: center; |
| 292 | justify-content: flex-end; |
| 293 | font-size: 90%; |
| 294 | margin-bottom: calc(-1.5 * var(--pad)); |
| 295 | border-radius: var(--pad); |
| 296 | } |
| 297 | .text-area-toolbar .choose-file { |
| 298 | display: none; |
| 299 | } |
| 300 | |
| 301 | .commit-info-tokenized-field { |
| 302 | position: relative; |
| 303 | display: flex; |
| 304 | gap: var(--halfpad); |
| 305 | align-items: center; |
| 306 | flex-wrap: wrap; |
| 307 | padding: var(--halfpad) 0; |
| 308 | --token-height: 26px; |
| 309 | } |
| 310 | .commit-info-tokenized-field vscode-text-field { |
| 311 | margin: 0; |
| 312 | } |
| 313 | |
| 314 | .commit-info-field-with-typeahead { |
| 315 | flex-grow: 1; |
| 316 | min-width: 30px; |
| 317 | position: relative; |
| 318 | height: var(--token-height); |
| 319 | } |
| 320 | |
| 321 | .commit-info-tokenized-field .token, |
| 322 | .suggested-reviewers .token { |
| 323 | padding: 0; |
| 324 | background-color: var(--tooltip-background); |
| 325 | padding: 0 var(--pad); |
| 326 | border: 1px solid var(--tooltip-border); |
| 327 | display: flex; |
| 328 | align-items: center; |
| 329 | gap: var(--halfpad); |
| 330 | min-height: calc(var(--token-height) - 2px); |
| 331 | } |
| 332 | |
| 333 | .commit-info-tokenized-field .token.clickable { |
| 334 | cursor: pointer; |
| 335 | } |
| 336 | |
| 337 | .commit-info-tokenized-field .token.clickable:hover { |
| 338 | background-color: var(--hover-darken); |
| 339 | text-decoration: underline; |
| 340 | } |
| 341 | |
| 342 | .commit-info-tokenized-field .token button { |
| 343 | margin-right: calc(-1 * var(--pad)); |
| 344 | } |
| 345 | |
| 346 | .commit-info-tokenized-field .typeahead-suggestions { |
| 347 | position: absolute; |
| 348 | top: calc(100% + var(--halfpad)); |
| 349 | max-width: 250px; |
| 350 | min-width: 250px; |
| 351 | z-index: 20; |
| 352 | display: flex; |
| 353 | flex-direction: column; |
| 354 | gap: var(--pad); |
| 355 | height: unset; |
| 356 | } |
| 357 | |
| 358 | .commit-info-tokenized-field:not(:focus-within) .typeahead-suggestions { |
| 359 | display: none; |
| 360 | } |
| 361 | |
| 362 | .commit-info-tokenized-field .typeahead-suggestions .suggestion { |
| 363 | --typeahead-img-size: 30px; |
| 364 | display: flex; |
| 365 | flex-direction: row; |
| 366 | gap: var(--pad); |
| 367 | align-items: center; |
| 368 | border-radius: var(--halfpad); |
| 369 | padding: var(--halfpad); |
| 370 | margin: calc(-1 * var(--halfpad)); |
| 371 | cursor: pointer; |
| 372 | } |
| 373 | |
| 374 | .commit-info-tokenized-field .typeahead-suggestions .suggestion:hover, |
| 375 | .commit-info-tokenized-field .typeahead-suggestions .selected-suggestion { |
| 376 | background-color: var(--hover-darken); |
| 377 | } |
| 378 | .commit-info-tokenized-field .typeahead-suggestions .suggestion-label { |
| 379 | display: flex; |
| 380 | flex-direction: column; |
| 381 | overflow-wrap: break-word; |
| 382 | max-width: calc(100% - var(--typeahead-img-size)); |
| 383 | } |
| 384 | |
| 385 | .commit-info-tokenized-field .typeahead-suggestions img { |
| 386 | width: var(--typeahead-img-size); |
| 387 | height: var(--typeahead-img-size); |
| 388 | min-width: var(--typeahead-img-size); |
| 389 | border-radius: 100%; |
| 390 | position: relative; |
| 391 | background: linear-gradient(45deg, var(--background), var(--foreground)); |
| 392 | } |
| 393 | |
| 394 | .commit-info-tokenized-field .typeahead-suggestions img::before { |
| 395 | /* fallback if the image URL doesn't load */ |
| 396 | content: ''; |
| 397 | position: absolute; |
| 398 | top: 0; |
| 399 | left: 0; |
| 400 | bottom: 0; |
| 401 | right: 0; |
| 402 | line-height: var(--typeahead-img-size); |
| 403 | background: linear-gradient(45deg, var(--background), var(--foreground)); |
| 404 | text-align: center; |
| 405 | border-radius: 100%; |
| 406 | display: block; |
| 407 | width: var(--typeahead-img-size); |
| 408 | height: var(--typeahead-img-size); |
| 409 | overflow: hidden; |
| 410 | } |
| 411 | |
| 412 | .upload-status { |
| 413 | cursor: pointer; |
| 414 | user-select: none; |
| 415 | min-height: 22px; |
| 416 | display: flex; |
| 417 | } |
| 418 | |
| 419 | .upload-status-error { |
| 420 | display: flex; |
| 421 | align-items: center; |
| 422 | gap: var(--pad); |
| 423 | } |
| 424 | |
| 425 | .upload-status-error vscode-button { |
| 426 | opacity: 0; |
| 427 | transition: opacity 0.2s; |
| 428 | } |
| 429 | .upload-status-error:hover vscode-button { |
| 430 | opacity: 1; |
| 431 | } |
| 432 | |
| 433 | .image-drop-zone { |
| 434 | position: relative; |
| 435 | } |
| 436 | .image-drop-zone.hovering-to-drop:before { |
| 437 | width: 100%; |
| 438 | height: calc(100% - 4px); |
| 439 | display: flex; |
| 440 | content: 'Drop here to upload'; |
| 441 | position: absolute; |
| 442 | left: 0; |
| 443 | top: 0; |
| 444 | z-index: 2; |
| 445 | right: 0; |
| 446 | justify-content: center; |
| 447 | align-items: center; |
| 448 | font-size: 120%; |
| 449 | background-color: rgba(0, 0, 0, 0.1); |
| 450 | } |
| 451 | |
| 452 | .commit-info-view-main-content > .tooltip-creator { |
| 453 | width: 100%; |
| 454 | } |
| 455 | |