| 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 | .interactive-split { |
| 9 | height: 100%; |
| 10 | position: relative; |
| 11 | min-width: calc((100vw / var(--zoom)) - 81px); |
| 12 | min-height: calc((100vh / var(--zoom)) - 220px); |
| 13 | |
| 14 | margin-inline: calc(0px - var(--pad)); |
| 15 | font-size: var(--editor-font-size); |
| 16 | } |
| 17 | |
| 18 | .modal .edit-stack-modal-contents { |
| 19 | --split-vertical-overhead: 210px; |
| 20 | } |
| 21 | .modal .split-single-commit-modal-contents { |
| 22 | --split-vertical-overhead: 150px; |
| 23 | } |
| 24 | |
| 25 | .split-commit-column { |
| 26 | margin-inline: var(--pad); |
| 27 | background-color: var(--tooltip-background); |
| 28 | padding: var(--pad); |
| 29 | padding-bottom: 0px; |
| 30 | border-radius: var(--halfpad); |
| 31 | min-width: 700px; |
| 32 | max-width: 700px; |
| 33 | flex-shrink: 0; |
| 34 | height: 100%; |
| 35 | } |
| 36 | |
| 37 | .split-commit-header { |
| 38 | font-size: 110%; |
| 39 | display: flex; |
| 40 | flex-direction: row; |
| 41 | align-items: center; |
| 42 | gap: var(--pad); |
| 43 | margin: var(--pad) 0px; |
| 44 | margin-bottom: calc(2 * var(--pad)); |
| 45 | } |
| 46 | |
| 47 | .split-commit-header-stack-number { |
| 48 | flex-shrink: 0; |
| 49 | font-size: 140%; |
| 50 | font-weight: 300; |
| 51 | opacity: 0.8; |
| 52 | margin: 0 var(--pad); |
| 53 | } |
| 54 | |
| 55 | .split-range-selector-button { |
| 56 | font-size: 90%; |
| 57 | display: flex; |
| 58 | gap: var(--pad); |
| 59 | align-items: center; |
| 60 | } |
| 61 | |
| 62 | .split-range-selector-info { |
| 63 | display: flex; |
| 64 | align-items: center; |
| 65 | gap: var(--pad); |
| 66 | background-color: var(--subtle-hover-darken); |
| 67 | border-radius: 8px; |
| 68 | padding: var(--pad); |
| 69 | } |
| 70 | |
| 71 | .split-range-selector { |
| 72 | overflow: auto; |
| 73 | display: flex; |
| 74 | flex-direction: column; |
| 75 | gap: var(--pad); |
| 76 | max-height: 50vh; |
| 77 | } |
| 78 | .split-range-selector .inner-commit-group { |
| 79 | margin-left: var(--halfpad); |
| 80 | } |
| 81 | .split-range-commit { |
| 82 | display: flex; |
| 83 | flex-direction: row; |
| 84 | gap: var(--halfpad); |
| 85 | align-items: center; |
| 86 | padding-left: calc(3 * var(--pad)); |
| 87 | margin-left: -20px; |
| 88 | user-select: none; |
| 89 | cursor: pointer; |
| 90 | padding-block: calc(var(--halfpad) / 2); |
| 91 | } |
| 92 | |
| 93 | .split-range-commit .commit-title { |
| 94 | opacity: 0.7; |
| 95 | } |
| 96 | .split-range-commit:hover .commit-title { |
| 97 | opacity: 0.9; |
| 98 | } |
| 99 | |
| 100 | .split-range-commit.selection-start .commit-title, |
| 101 | .split-range-commit.selection-end .commit-title, |
| 102 | .split-range-commit.selection-middle .commit-title { |
| 103 | opacity: 1; |
| 104 | } |
| 105 | |
| 106 | .split-range-commit .commit-selection-avatar { |
| 107 | position: absolute; |
| 108 | z-index: 0; |
| 109 | left: -21px; |
| 110 | border-radius: 24px; |
| 111 | height: 12px; |
| 112 | width: 14px; |
| 113 | box-sizing: border-box; |
| 114 | } |
| 115 | |
| 116 | .split-range-commit.selection-start .commit-selection-avatar, |
| 117 | .split-range-commit.selection-middle .commit-selection-avatar, |
| 118 | .split-range-commit.selection-end .commit-selection-avatar { |
| 119 | background-color: var(--focus-border); |
| 120 | border-color: var(--focus-border); |
| 121 | width: 24px; |
| 122 | height: 24px; |
| 123 | left: -26px; |
| 124 | } |
| 125 | .split-range-commit.selection-start .commit-selection-avatar { |
| 126 | border-top-right-radius: 0; |
| 127 | border-top-left-radius: 0; |
| 128 | height: 28px; |
| 129 | transform: translateY(-2px); |
| 130 | } |
| 131 | |
| 132 | .split-range-commit.selection-end .commit-selection-avatar { |
| 133 | border-bottom-right-radius: 0; |
| 134 | border-bottom-left-radius: 0; |
| 135 | height: 28px; |
| 136 | transform: translateY(2px); |
| 137 | } |
| 138 | .split-range-commit.selection-middle .commit-selection-avatar { |
| 139 | border-radius: 0; |
| 140 | border-top-width: 17px; |
| 141 | height: 28px; |
| 142 | } |
| 143 | .split-range-commit.selection-end.selection-start .commit-selection-avatar { |
| 144 | border-radius: 24px; |
| 145 | height: 24px; |
| 146 | transform: none; |
| 147 | } |
| 148 | .split-range-commit.selection-end .commit-avatar, |
| 149 | .split-range-commit.selection-middle .commit-avatar, |
| 150 | .split-range-commit.selection-start .commit-avatar { |
| 151 | border: none; |
| 152 | } |
| 153 | |
| 154 | label.split-range-label { |
| 155 | font-size: 80%; |
| 156 | } |
| 157 | |
| 158 | .split-insert-blank-commit-container { |
| 159 | height: auto; |
| 160 | margin-top: var(--pad); |
| 161 | } |
| 162 | .split-insert-blank-commit-container > .tooltip-creator { |
| 163 | height: calc(100% - 3 * var(--pad)); |
| 164 | } |
| 165 | .split-insert-blank-commit { |
| 166 | cursor: pointer; |
| 167 | margin: calc(-1 * var(--pad) + var(--halfpad)); |
| 168 | padding: var(--halfpad); |
| 169 | margin-top: calc(2 * var(--pad)); |
| 170 | padding-bottom: 0; |
| 171 | margin-bottom: 0; |
| 172 | height: 100%; |
| 173 | transition: background-color 0.1s; |
| 174 | border-radius: 4px; |
| 175 | } |
| 176 | .split-insert-blank-commit:hover { |
| 177 | background-color: var(--tooltip-background); |
| 178 | } |
| 179 | .split-insert-blank-commit .codicon { |
| 180 | transition: transform 0.1s; |
| 181 | margin-left: 1px; |
| 182 | margin-right: -1px; |
| 183 | } |
| 184 | .split-insert-blank-commit:hover .codicon { |
| 185 | transform: scale(1.5); |
| 186 | } |
| 187 | |
| 188 | .split-commit-file, |
| 189 | .split-commit-file pre { |
| 190 | font-family: var(--monospace-fontFamily); |
| 191 | } |
| 192 | |
| 193 | .split-commit-file { |
| 194 | background-color: var(--background); |
| 195 | margin-bottom: var(--pad); |
| 196 | } |
| 197 | .split-commit-file .split-diff-view-file-header { |
| 198 | background-color: var(--background); |
| 199 | border: 1px solid var(--panel-view-border); |
| 200 | margin-left: 0; |
| 201 | margin-right: 0; |
| 202 | } |
| 203 | .split-commit-file-arrows vscode-button { |
| 204 | font-family: var(--monospace-fontFamily); |
| 205 | opacity: 0.5; |
| 206 | font-size: 120%; |
| 207 | min-width: 25px; |
| 208 | } |
| 209 | .split-commit-file-arrows vscode-button:hover { |
| 210 | opacity: 0.8; |
| 211 | } |
| 212 | .split-commit-file-arrows vscode-button:hover::part(content) { |
| 213 | transform: scale(1.3); |
| 214 | } |
| 215 | |
| 216 | .split-file { |
| 217 | border: 1px solid var(--panel-view-border); |
| 218 | border-top-width: 0px; |
| 219 | } |
| 220 | |
| 221 | .split-commit-file table { |
| 222 | white-space: pre-wrap; |
| 223 | border-spacing: 0px; |
| 224 | } |
| 225 | .split-commit-file tr { |
| 226 | /* Set line-height explicitly to avoid dynamic line heights based on (different) fonts decided by text content. */ |
| 227 | line-height: 1.2; |
| 228 | } |
| 229 | |
| 230 | .split-commit-file td { |
| 231 | padding: 0; |
| 232 | } |
| 233 | |
| 234 | .split-commit-file .split-line-content { |
| 235 | word-break: break-all; |
| 236 | } |
| 237 | |
| 238 | .split-file .split-left-lineno, |
| 239 | .split-file .split-right-lineno { |
| 240 | vertical-align: top; |
| 241 | } |
| 242 | |
| 243 | .split-file .context-button { |
| 244 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M0 10 Q10 15 20 10 Q30 5 40 10' stroke='grey' fill='transparent' /%3E%3C/svg%3E"); |
| 245 | background-repeat: repeat-x; |
| 246 | user-select: none; |
| 247 | cursor: pointer; |
| 248 | opacity: 0.8; |
| 249 | position: relative; |
| 250 | transition: opacity 0.1s; |
| 251 | } |
| 252 | .split-file .context-button:before { |
| 253 | opacity: 0; |
| 254 | transition: opacity 0.1s; |
| 255 | display: block; |
| 256 | position: absolute; |
| 257 | left: calc(50% - 70px); |
| 258 | right: calc(50% - 70px); |
| 259 | text-align: center; |
| 260 | padding: 0 var(--pad); |
| 261 | content: 'Click to expand'; |
| 262 | } |
| 263 | .split-file .context-button:hover { |
| 264 | opacity: 1; |
| 265 | } |
| 266 | .split-file .context-button:hover:before { |
| 267 | opacity: 1; |
| 268 | background-color: var(--background); |
| 269 | } |
| 270 | |
| 271 | .split-file .lineno { |
| 272 | padding-left: var(--halfpad); |
| 273 | padding-right: var(--halfpad); |
| 274 | text-align: right; |
| 275 | user-select: none; |
| 276 | } |
| 277 | .split-right-lineno, |
| 278 | .split-left-lineno, |
| 279 | .split-right-button, |
| 280 | .split-left-button { |
| 281 | background-color: var(--subtle-hover-darken); |
| 282 | user-select: none; |
| 283 | } |
| 284 | |
| 285 | .split-file tr.add { |
| 286 | background: var(--diffEditor-insertedLineBackground); |
| 287 | } |
| 288 | .split-file tr.del { |
| 289 | background: var(--diffEditor-removedLineBackground); |
| 290 | } |
| 291 | .split-file tr:hover.add { |
| 292 | background: var(--diffEditor-insertedLineHighlightBackground); |
| 293 | } |
| 294 | .split-file tr:hover.del { |
| 295 | background: var(--diffEditor-removedLineHighlightBackground); |
| 296 | } |
| 297 | |
| 298 | .split-file tr.selected.add { |
| 299 | background: var(--diffEditor-insertedLineHighlightBackground); |
| 300 | } |
| 301 | .split-file tr.selected.del { |
| 302 | background: var(--diffEditor-removedLineHighlightBackground); |
| 303 | } |
| 304 | |
| 305 | .split-file .main-content { |
| 306 | min-width: 200px; |
| 307 | position: relative; |
| 308 | } |
| 309 | |
| 310 | .split-file .line { |
| 311 | padding-left: var(--halfpad); |
| 312 | } |
| 313 | |
| 314 | .split-file .selected .button { |
| 315 | opacity: 0.8; |
| 316 | } |
| 317 | |
| 318 | .split-file .button { |
| 319 | user-select: none; |
| 320 | cursor: pointer; |
| 321 | opacity: 0.3; |
| 322 | display: block; |
| 323 | transition: transform 0.1s; |
| 324 | } |
| 325 | |
| 326 | .split-commit-file tr.selected .button { |
| 327 | opacity: 0.6; |
| 328 | transform: translateX(-2px) scale(1.25); |
| 329 | } |
| 330 | .split-commit-file tr:hover .button { |
| 331 | opacity: 0.7; |
| 332 | transform: translateX(-2px) scale(1.3); |
| 333 | } |
| 334 | .split-commit-file tr:hover .left .button { |
| 335 | transform: translateX(2px) scale(1.3); |
| 336 | } |
| 337 | |
| 338 | .split-file .button:active { |
| 339 | color: grey; |
| 340 | opacity: 1; |
| 341 | } |
| 342 | |
| 343 | .split-file-row .filerev-title { |
| 344 | padding-left: var(--pad); |
| 345 | text-overflow: ellipsis; |
| 346 | } |
| 347 | |
| 348 | .split-header-hint { |
| 349 | padding: var(--pad); |
| 350 | border: 1px solid var(--panel-view-border); |
| 351 | border-top: none; |
| 352 | background: var(--hint-background); |
| 353 | } |
| 354 | |