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