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