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