| 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 | .split-diff-view { |
| b69ab31 | | | 9 | border: 1px solid var(--tooltip-border); |
| b69ab31 | | | 10 | border-radius: 2px; |
| b69ab31 | | | 11 | color: var(--diffEditor-foreground); |
| b69ab31 | | | 12 | font-family: var(--monospace-fontFamily); |
| b69ab31 | | | 13 | tab-size: var(--tab-size); |
| b69ab31 | | | 14 | } |
| b69ab31 | | | 15 | |
| b69ab31 | | | 16 | .split-diff-view-hunk-table { |
| b69ab31 | | | 17 | font-family: var(--monospace-fontFamily); |
| b69ab31 | | | 18 | } |
| b69ab31 | | | 19 | |
| b69ab31 | | | 20 | .split-diff-view-file-header { |
| b69ab31 | | | 21 | display: flex; |
| b69ab31 | | | 22 | align-items: center; |
| b69ab31 | | | 23 | color: var(--diffEditor-foreground); |
| b69ab31 | | | 24 | background-color: var(--tooltip-background); |
| b69ab31 | | | 25 | padding: var(--halfpad) var(--pad); |
| b69ab31 | | | 26 | line-height: 2em; |
| b69ab31 | | | 27 | |
| b69ab31 | | | 28 | position: sticky; |
| b69ab31 | | | 29 | top: 0; |
| b69ab31 | | | 30 | margin-left: -1px; |
| b69ab31 | | | 31 | margin-right: -1px; |
| b69ab31 | | | 32 | border: 1px solid var(--panel-view-border); |
| b69ab31 | | | 33 | gap: var(--halfpad); |
| b69ab31 | | | 34 | z-index: 1; |
| b69ab31 | | | 35 | } |
| b69ab31 | | | 36 | |
| b69ab31 | | | 37 | .split-diff-view-file-header-toggle-open { |
| b69ab31 | | | 38 | padding-right: 2px; |
| b69ab31 | | | 39 | cursor: pointer; |
| b69ab31 | | | 40 | } |
| b69ab31 | | | 41 | |
| b69ab31 | | | 42 | .split-diff-view-file-header.file-header-collapsed { |
| b69ab31 | | | 43 | border-bottom-width: 0; |
| b69ab31 | | | 44 | } |
| b69ab31 | | | 45 | |
| b69ab31 | | | 46 | .split-diff-view-file-header-open-button { |
| b69ab31 | | | 47 | color: var(--foreground); |
| b69ab31 | | | 48 | } |
| b69ab31 | | | 49 | |
| b69ab31 | | | 50 | .split-diff-view-file-path-parts { |
| b69ab31 | | | 51 | display: flex; |
| b69ab31 | | | 52 | flex-grow: 1; |
| b69ab31 | | | 53 | flex-shrink: 1; |
| b69ab31 | | | 54 | font-size: 12px; |
| b69ab31 | | | 55 | flex-wrap: wrap; |
| b69ab31 | | | 56 | line-height: 1em; |
| b69ab31 | | | 57 | } |
| b69ab31 | | | 58 | |
| b69ab31 | | | 59 | .split-diff-view-file-preamble { |
| b69ab31 | | | 60 | width: 100%; |
| b69ab31 | | | 61 | display: flex; |
| b69ab31 | | | 62 | flex-direction: column; |
| b69ab31 | | | 63 | align-items: center; |
| b69ab31 | | | 64 | } |
| b69ab31 | | | 65 | |
| b69ab31 | | | 66 | .split-diff-view-file-status-banner { |
| b69ab31 | | | 67 | background-color: var(--background); |
| b69ab31 | | | 68 | color: var(--foreground); |
| b69ab31 | | | 69 | width: 100%; |
| b69ab31 | | | 70 | display: flex; |
| b69ab31 | | | 71 | flex-direction: column; |
| b69ab31 | | | 72 | align-items: center; |
| b69ab31 | | | 73 | padding: var(--halfpad); |
| b69ab31 | | | 74 | } |
| b69ab31 | | | 75 | |
| b69ab31 | | | 76 | .split-diff-view-banner-added { |
| b69ab31 | | | 77 | background-color: var(--diffEditor-insertedLineHighlightBackground); |
| b69ab31 | | | 78 | color: var(--diffEditor-foreground); |
| b69ab31 | | | 79 | } |
| b69ab31 | | | 80 | .split-diff-view-banner-removed { |
| b69ab31 | | | 81 | background-color: var(--diffEditor-removedLineHighlightBackground); |
| b69ab31 | | | 82 | color: var(--diffEditor-foreground); |
| b69ab31 | | | 83 | } |
| b69ab31 | | | 84 | .split-diff-view-banner-modified { |
| b69ab31 | | | 85 | background-color: var(--diffEditor-modifiedLineHighlightBackground); |
| b69ab31 | | | 86 | color: var(--diffEditor-foreground); |
| b69ab31 | | | 87 | } |
| b69ab31 | | | 88 | |
| b69ab31 | | | 89 | .split-diff-view-file-status-banner .separator > div { |
| b69ab31 | | | 90 | padding: 1px; |
| b69ab31 | | | 91 | } |
| b69ab31 | | | 92 | |
| b69ab31 | | | 93 | .split-diff-view-hunk-separator { |
| b69ab31 | | | 94 | display: inline-block; |
| b69ab31 | | | 95 | padding: 0 var(--pad); |
| b69ab31 | | | 96 | cursor: pointer; |
| b69ab31 | | | 97 | } |
| b69ab31 | | | 98 | .split-diff-view-hunk-separator:hover { |
| b69ab31 | | | 99 | color: var(--highlight-foreground); |
| b69ab31 | | | 100 | background-color: rgba(0, 0, 0, 0.1); |
| b69ab31 | | | 101 | } |
| b69ab31 | | | 102 | |
| b69ab31 | | | 103 | .split-diff-view-inline-row-button { |
| b69ab31 | | | 104 | display: inline-block; |
| b69ab31 | | | 105 | padding: 2px var(--pad); |
| b69ab31 | | | 106 | cursor: pointer; |
| b69ab31 | | | 107 | } |
| b69ab31 | | | 108 | .split-diff-view-inline-row-button .codicon { |
| b69ab31 | | | 109 | vertical-align: sub; |
| b69ab31 | | | 110 | } |
| b69ab31 | | | 111 | .split-diff-view-inline-row-button .inline-row-button-label { |
| b69ab31 | | | 112 | margin: 0 calc(2 * var(--pad)); |
| b69ab31 | | | 113 | } |
| b69ab31 | | | 114 | .split-diff-view-inline-row-button:hover { |
| b69ab31 | | | 115 | color: var(--highlight-foreground); |
| b69ab31 | | | 116 | background-color: rgba(0, 0, 0, 0.1); |
| b69ab31 | | | 117 | } |
| b69ab31 | | | 118 | |
| b69ab31 | | | 119 | .split-diff-view-loading-row, |
| b69ab31 | | | 120 | .split-diff-view-error-row { |
| b69ab31 | | | 121 | padding: 2px var(--pad); |
| b69ab31 | | | 122 | display: flex; |
| b69ab31 | | | 123 | justify-content: center; |
| b69ab31 | | | 124 | align-items: center; |
| b69ab31 | | | 125 | gap: var(--pad); |
| b69ab31 | | | 126 | } |
| b69ab31 | | | 127 | |
| b69ab31 | | | 128 | .split-diff-view-hunk-table { |
| b69ab31 | | | 129 | border-spacing: 0; |
| b69ab31 | | | 130 | table-layout: fixed; |
| b69ab31 | | | 131 | width: 100%; |
| b69ab31 | | | 132 | } |
| b69ab31 | | | 133 | |
| b69ab31 | | | 134 | .split-diff-view-hunk-table tbody { |
| b69ab31 | | | 135 | vertical-align: top; |
| b69ab31 | | | 136 | } |
| b69ab31 | | | 137 | |
| b69ab31 | | | 138 | .split-diff-view-hunk-table td, |
| b69ab31 | | | 139 | .split-diff-view-file-preamble { |
| b69ab31 | | | 140 | font-size: var(--editor-font-size); |
| b69ab31 | | | 141 | line-height: 16px; |
| b69ab31 | | | 142 | white-space: pre-wrap; |
| b69ab31 | | | 143 | word-break: break-all; |
| b69ab31 | | | 144 | } |
| b69ab31 | | | 145 | |
| b69ab31 | | | 146 | .split-diff-view-hunk-table td { |
| b69ab31 | | | 147 | padding: 2px 0 2px 6px; |
| b69ab31 | | | 148 | } |
| b69ab31 | | | 149 | |
| b69ab31 | | | 150 | .split-diff-view-hunk-table td.lineNumber { |
| b69ab31 | | | 151 | padding-left: 10px; |
| b69ab31 | | | 152 | padding-right: 10px; |
| b69ab31 | | | 153 | text-align: right; |
| b69ab31 | | | 154 | white-space: nowrap; |
| b69ab31 | | | 155 | background-color: var(--subtle-hover-darken); |
| b69ab31 | | | 156 | } |
| b69ab31 | | | 157 | |
| b69ab31 | | | 158 | .split-diff-view-hunk-table.display-split td:nth-child(3) { |
| b69ab31 | | | 159 | border-left: 1px solid var(--tooltip-border); |
| b69ab31 | | | 160 | } |
| b69ab31 | | | 161 | |
| b69ab31 | | | 162 | .split-diff-view-hunk-table.display-unified td:nth-child(1) { |
| b69ab31 | | | 163 | border-right: 1px solid var(--hover-darken); |
| b69ab31 | | | 164 | } |
| b69ab31 | | | 165 | |
| b69ab31 | | | 166 | .split-diff-view-hunk-table tr.separator-row { |
| b69ab31 | | | 167 | background-color: var(--tooltip-background); |
| b69ab31 | | | 168 | height: 12px; |
| b69ab31 | | | 169 | } |
| b69ab31 | | | 170 | |
| b69ab31 | | | 171 | .split-diff-view-hunk-table td.separator { |
| b69ab31 | | | 172 | line-height: 20px; |
| b69ab31 | | | 173 | padding: 0; |
| b69ab31 | | | 174 | text-align: center; |
| b69ab31 | | | 175 | } |
| b69ab31 | | | 176 | |
| b69ab31 | | | 177 | .split-diff-view-show-deleted { |
| b69ab31 | | | 178 | display: inline-block; |
| b69ab31 | | | 179 | padding: var(--pad); |
| b69ab31 | | | 180 | cursor: pointer; |
| b69ab31 | | | 181 | } |
| b69ab31 | | | 182 | .split-diff-view-show-deleted:hover { |
| b69ab31 | | | 183 | color: var(--highlight-foreground); |
| b69ab31 | | | 184 | background-color: rgba(0, 0, 0, 0.1); |
| b69ab31 | | | 185 | } |
| b69ab31 | | | 186 | |
| b69ab31 | | | 187 | .patch-word-begin { |
| b69ab31 | | | 188 | border-top-left-radius: 0.2em; |
| b69ab31 | | | 189 | border-bottom-left-radius: 0.2em; |
| b69ab31 | | | 190 | } |
| b69ab31 | | | 191 | |
| b69ab31 | | | 192 | .patch-word-end { |
| b69ab31 | | | 193 | border-top-right-radius: 0.2em; |
| b69ab31 | | | 194 | border-bottom-right-radius: 0.2em; |
| b69ab31 | | | 195 | } |
| b69ab31 | | | 196 | |
| b69ab31 | | | 197 | .patch-add-line { |
| b69ab31 | | | 198 | background-color: var(--diffEditor-insertedLineBackground); |
| b69ab31 | | | 199 | } |
| b69ab31 | | | 200 | |
| b69ab31 | | | 201 | td.lineNumber.patch-add-line-number, |
| b69ab31 | | | 202 | .patch-add-word { |
| b69ab31 | | | 203 | background-color: var(--diffEditor-insertedLineHighlightBackground); |
| b69ab31 | | | 204 | } |
| b69ab31 | | | 205 | |
| b69ab31 | | | 206 | .patch-remove-line { |
| b69ab31 | | | 207 | background-color: var(--diffEditor-removedLineBackground); |
| b69ab31 | | | 208 | } |
| b69ab31 | | | 209 | |
| b69ab31 | | | 210 | td.lineNumber.patch-remove-line-number, |
| b69ab31 | | | 211 | .patch-remove-word { |
| b69ab31 | | | 212 | background-color: var(--diffEditor-removedLineHighlightBackground); |
| b69ab31 | | | 213 | } |
| b69ab31 | | | 214 | |
| b69ab31 | | | 215 | td.lineNumber.patch-expanded-number { |
| b69ab31 | | | 216 | color: var(--foreground); |
| b69ab31 | | | 217 | } |
| b69ab31 | | | 218 | |
| b69ab31 | | | 219 | .lineNumber.clickable { |
| b69ab31 | | | 220 | cursor: pointer; |
| b69ab31 | | | 221 | } |
| b69ab31 | | | 222 | |
| b69ab31 | | | 223 | .lineNumber.clickable:hover { |
| b69ab31 | | | 224 | text-decoration: underline; |
| b69ab31 | | | 225 | } |