| 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 | .branch-indicator { |
| 9 | stroke: var(--foreground); |
| 10 | position: absolute; |
| 11 | bottom: -20px; |
| 12 | left: -30px; |
| 13 | margin-bottom: -5px; |
| 14 | z-index: 2; |
| 15 | } |
| 16 | .commit-group { |
| 17 | margin-bottom: 30px; |
| 18 | margin-bottom: 20px; |
| 19 | margin-left: 20px; |
| 20 | margin-top: 10px; |
| 21 | position: relative; |
| 22 | display: flex; |
| 23 | flex-direction: column; |
| 24 | gap: calc(var(--halfpad) / 2); |
| 25 | } |
| 26 | .commit-tree-root { |
| 27 | margin-top: calc(2px + var(--halfpad)); |
| 28 | } |
| 29 | .commit-tree-stack-actions { |
| 30 | display: flex; |
| 31 | flex-direction: row; |
| 32 | gap: var(--pad); |
| 33 | align-items: center; |
| 34 | margin-top: var(--halfpad); |
| 35 | margin-bottom: calc(2 * var(--pad)); |
| 36 | margin-left: var(--halfpad); |
| 37 | } |
| 38 | |
| 39 | .commit-group.with-vertical-line:before { |
| 40 | /* branch vertical line - used by split range selector */ |
| 41 | content: ' '; |
| 42 | border-left: 2px solid var(--foreground); |
| 43 | position: absolute; |
| 44 | bottom: 5px; |
| 45 | top: 20px; |
| 46 | left: -10px; |
| 47 | z-index: 1; |
| 48 | } |
| 49 | .commit { |
| 50 | position: relative; |
| 51 | } |
| 52 | |
| 53 | /* used by the split branch selection */ |
| 54 | .commit-avatar { |
| 55 | position: absolute; |
| 56 | border: 1px solid var(--foreground); |
| 57 | margin-bottom: 0px; |
| 58 | z-index: 3; |
| 59 | background-color: var(--foreground, hsla(0, 0%, 0%, 0.1)); |
| 60 | display: inline-block; |
| 61 | vertical-align: top; |
| 62 | overflow: hidden; |
| 63 | left: -22px; |
| 64 | top: auto; |
| 65 | bottom: auto; |
| 66 | border-radius: 50%; |
| 67 | height: 16px; |
| 68 | width: 16px; |
| 69 | box-sizing: border-box; |
| 70 | transition: |
| 71 | transform 0.2s, |
| 72 | box-shadow 0.3s; |
| 73 | } |
| 74 | |
| 75 | /* Avatar may render below the top of the border, |
| 76 | * cover up the border that peeks out the top with background color, |
| 77 | * but only on the top commit of a stack |
| 78 | */ |
| 79 | .commit.topmost .commit-details:before { |
| 80 | left: -15px; |
| 81 | top: 0; |
| 82 | content: ''; |
| 83 | width: 2px; |
| 84 | height: calc(50%); |
| 85 | background-color: var(--background); |
| 86 | position: absolute; |
| 87 | } |
| 88 | .commit.topmost.head-commit .commit-details:before { |
| 89 | background-color: var(--button-primary-hover-background); |
| 90 | } |
| 91 | |
| 92 | .commit.highlighted .commit-avatar { |
| 93 | box-shadow: 0px 0px 4px 2px var(--focus-border); |
| 94 | transform: scale(1.2); |
| 95 | } |
| 96 | |
| 97 | .head-commit .commit-avatar { |
| 98 | border-color: var(--button-primary-hover-background); |
| 99 | } |
| 100 | |
| 101 | .commit.obsolete .commit-title { |
| 102 | opacity: 0.5; |
| 103 | } |
| 104 | |
| 105 | .commit.irrelevant .commit-title { |
| 106 | opacity: 0.5; |
| 107 | } |
| 108 | |
| 109 | .commit-rows { |
| 110 | display: flex; |
| 111 | flex-direction: row; |
| 112 | gap: calc(var(--halfpad) / 2) var(--halfpad); |
| 113 | padding: calc(var(--halfpad) / 2); |
| 114 | padding-left: 0; |
| 115 | margin-left: var(--halfpad); |
| 116 | position: relative; |
| 117 | align-items: center; |
| 118 | z-index: 1; |
| 119 | } |
| 120 | |
| 121 | .commit-row-selected { |
| 122 | background-color: var(--selected-commit-background); |
| 123 | outline: none; |
| 124 | } |
| 125 | .render-dag .commit-row-selected { |
| 126 | margin-left: calc(-1 * var(--pad)); |
| 127 | padding-left: calc(2 * var(--pad)); |
| 128 | } |
| 129 | |
| 130 | .commit-row-actioning { |
| 131 | outline: 1px solid var(--focus-border); |
| 132 | outline-offset: -1px; |
| 133 | } |
| 134 | |
| 135 | .commit-tree-root { |
| 136 | min-width: 450px; |
| 137 | } |
| 138 | |
| 139 | .commit-tree-narrow .commit-rows { |
| 140 | flex-direction: column; |
| 141 | align-items: initial; |
| 142 | } |
| 143 | |
| 144 | .commit-tree-narrow .commit-group { |
| 145 | gap: 0; |
| 146 | } |
| 147 | |
| 148 | .commit-details { |
| 149 | cursor: pointer; |
| 150 | display: flex; |
| 151 | align-items: center; |
| 152 | gap: var(--halfpad) var(--pad); |
| 153 | position: relative; |
| 154 | box-sizing: border-box; |
| 155 | user-select: none; |
| 156 | /* Increase Draggable Commit size to overlap with avatar, without changing where the commit renders */ |
| 157 | margin-left: -30px; |
| 158 | padding-left: 30px; |
| 159 | /* Increase drag target for commit on the right so you can drag nearly anywhere on the row to preview the rebase */ |
| 160 | margin-right: -400px; |
| 161 | padding-right: 400px; |
| 162 | /* Put drag target behind buttons, so expanded ranges don't interfere with clicking buttons */ |
| 163 | z-index: -1; |
| 164 | } |
| 165 | |
| 166 | .commit-title { |
| 167 | min-width: 180px; |
| 168 | } |
| 169 | |
| 170 | .commit-details:focus-visible { |
| 171 | outline: var(--focus-border) 1px auto; |
| 172 | outline-offset: var(--halfpad); |
| 173 | } |
| 174 | |
| 175 | .commit-wide-drag-target { |
| 176 | position: absolute; |
| 177 | left: 0; |
| 178 | top: 0; |
| 179 | width: 500px; /* Arbitrary minimum size we want to be able to drag through, so we can't "miss" small commits */ |
| 180 | height: 100%; |
| 181 | z-index: -100; |
| 182 | } |
| 183 | |
| 184 | .commit-details > .tooltip-creator { |
| 185 | display: flex; |
| 186 | align-items: center; |
| 187 | } |
| 188 | |
| 189 | .commit-second-row { |
| 190 | display: flex; |
| 191 | gap: var(--pad); |
| 192 | align-items: center; |
| 193 | flex-shrink: 0; |
| 194 | } |
| 195 | |
| 196 | .commit-date { |
| 197 | font-size: 90%; |
| 198 | opacity: 0.8; |
| 199 | margin: 0 2px; |
| 200 | } |
| 201 | .commit-title .commit-date { |
| 202 | margin-left: var(--pad); |
| 203 | } |
| 204 | |
| 205 | |
| 206 | .commit .unsaved-message-indicator { |
| 207 | color: var(--button-primary-background); |
| 208 | display: flex; |
| 209 | } |
| 210 | |
| 211 | .commit vscode-tag::part(control) { |
| 212 | text-transform: unset; |
| 213 | } |
| 214 | |
| 215 | .commit-preview-rebase-root, |
| 216 | .commit-preview-rebase-descendant { |
| 217 | color: var(--scm-added-foreground); |
| 218 | } |
| 219 | .commit-preview-rebase-old { |
| 220 | opacity: 0.5; |
| 221 | } |
| 222 | |
| 223 | .commit-preview-hidden-root > .commit-title, |
| 224 | .commit-preview-hidden-descendant > .commit-title { |
| 225 | opacity: 0.5; |
| 226 | text-decoration: line-through; |
| 227 | } |
| 228 | |
| 229 | .commit-inline-operation-progress { |
| 230 | display: flex; |
| 231 | flex-direction: row; |
| 232 | align-items: center; |
| 233 | font-size: 80%; |
| 234 | gap: 10px; |
| 235 | opacity: 0.9; |
| 236 | margin-right: var(--halfpad); |
| 237 | } |
| 238 | |
| 239 | @media (prefers-reduced-motion: no-preference) { |
| 240 | @keyframes delayFadeIn { |
| 241 | 0% { |
| 242 | opacity: 0; |
| 243 | } |
| 244 | 90% { |
| 245 | opacity: 0; |
| 246 | } |
| 247 | 100% { |
| 248 | opacity: 1; |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | .commit-inline-operation-progress { |
| 253 | animation: delayFadeIn 1s ease-in-out; |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | .goto-button, |
| 258 | .open-commit-info-button { |
| 259 | opacity: 0; |
| 260 | transition: opacity 0.1s; |
| 261 | } |
| 262 | |
| 263 | .commit:hover .goto-button, |
| 264 | .commit:hover .open-commit-info-button { |
| 265 | opacity: 1; |
| 266 | } |
| 267 | |
| 268 | .goto-button:focus-within, |
| 269 | .open-commit-info-button:focus-within { |
| 270 | opacity: 1; |
| 271 | } |
| 272 | |
| 273 | .stable-commit-metadata { |
| 274 | display: flex; |
| 275 | } |
| 276 | |
| 277 | .stable-commit-metadata vscode-tag::part(control) { |
| 278 | background-color: var(--list-hover-background); |
| 279 | color: var(--list-hover-foreground); |
| 280 | text-overflow: ellipsis; |
| 281 | max-width: 150px; |
| 282 | white-space: nowrap; |
| 283 | overflow: hidden; |
| 284 | } |
| 285 | |
| 286 | .tooltip span.commit-title { |
| 287 | border-radius: 4px; |
| 288 | padding: 1px 4px; |
| 289 | font-size: 90%; |
| 290 | background-color: var(--hover-darken); |
| 291 | } |
| 292 | |
| 293 | .fetch-additional-commits-row { |
| 294 | display: flex; |
| 295 | align-items: center; |
| 296 | margin: var(--halfpad); |
| 297 | position: relative; |
| 298 | min-height: var(--vscode-icon-button-height); |
| 299 | } |
| 300 | |