4.3 KB198 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.file-stack-editor,
9.file-unified-stack-editor {
10 border: 1px solid var(--tooltip-border);
11 width: fit-content;
12 height: fit-content;
13}
14
15.file-stack-editor pre {
16 padding: 0;
17 margin: 0;
18 /* Set line-height explicitly to avoid dynamic line heights based on (different) fonts decided by text content. */
19 line-height: 1.2;
20}
21
22.file-stack-editor .column-left-buttons,
23.file-stack-editor .column-right-buttons,
24.file-stack-editor .column-left-gutter,
25.file-stack-editor .column-right-gutter {
26 background-color: rgba(128, 128, 128, 0.1);
27}
28
29.file-stack-editor .context-button,
30.file-unified-stack-editor .context-button {
31 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");
32 background-repeat: repeat-x;
33 user-select: none;
34 cursor: pointer;
35}
36
37.file-stack-editor .lineno {
38 padding-left: var(--halfpad);
39 padding-right: var(--halfpad);
40 text-align: right;
41 user-select: none;
42 min-width: 1.5rem;
43}
44
45.file-stack-editor .lineno.add {
46 background: var(--diffEditor-insertedLineHighlightBackground);
47}
48
49.file-stack-editor .lineno.del {
50 background: var(--diffEditor-removedLineHighlightBackground);
51}
52
53.file-stack-editor .lineno.change {
54 background: var(--editor-changedHighlightBackground);
55}
56
57.file-stack-editor .main-content {
58 min-width: 200px;
59 position: relative;
60}
61
62.file-stack-editor .line {
63 padding-left: var(--halfpad);
64}
65
66.file-stack-editor .selected .button {
67 opacity: 0.8;
68}
69
70.file-stack-editor .button {
71 user-select: none;
72 cursor: pointer;
73 opacity: 0.3;
74}
75
76.file-stack-editor .button:active {
77 color: grey;
78 opacity: 1;
79}
80
81.file-stack-editor .add {
82 background: var(--diffEditor-insertedLineBackground);
83}
84
85.file-stack-editor .del {
86 background: var(--diffEditor-removedLineBackground);
87}
88
89.file-stack-editor .line.change {
90 background: var(--editor-changedBackground);
91}
92
93.file-stack-editor-row .filerev-title {
94 padding-left: var(--pad);
95 text-overflow: ellipsis;
96}
97
98.file-stack-editor-ribbon-no-clip {
99 position: relative;
100 margin: var(--pad);
101}
102
103.file-stack-editor-ribbon-no-clip .ribbon {
104 position: absolute;
105 stroke: none;
106 fill: var(--editor-changedHighlightBackground);
107 z-index: 1;
108}
109
110.file-stack-editor-ribbon-no-clip .ribbon.add {
111 fill: var(--diffEditor-insertedLineHighlightBackground);
112}
113
114.file-stack-editor-ribbon-no-clip .ribbon.del {
115 fill: var(--diffEditor-removedLineHighlightBackground);
116}
117
118.file-unified-stack-editor {
119 background-color: var(--background);
120 width: 100%;
121 border-spacing: 0;
122}
123
124.file-unified-stack-editor thead {
125 position: sticky;
126 top: 0;
127 background-color: var(--background);
128 z-index: 1;
129 user-select: none;
130}
131
132.file-unified-stack-editor th {
133 font-weight: unset;
134}
135
136.file-unified-stack-editor tbody {
137 font-family: var(--monospace-fontFamily);
138 font-size: 13px;
139}
140
141.file-unified-stack-editor td {
142 padding: 0;
143}
144
145.file-unified-stack-editor td:last-child,
146.file-unified-stack-editor th:last-child {
147 width: 100%;
148}
149
150.file-unified-stack-editor .color1 {
151 background-color: rgba(128, 128, 160, 0.08);
152}
153.file-unified-stack-editor .color2 {
154 background-color: rgba(128, 128, 160, 0.15);
155}
156.file-unified-stack-editor .color3 {
157 background-color: rgba(128, 128, 160, 0.08);
158}
159.file-unified-stack-editor .color0 {
160 background-color: rgba(128, 128, 160, 0.15);
161}
162
163.file-unified-stack-editor .checkbox {
164 user-select: none;
165 padding-left: var(--halfpad);
166 padding-right: var(--halfpad);
167}
168
169.file-unified-stack-editor .checkbox.mutable {
170 cursor: pointer;
171}
172
173.file-unified-stack-editor .checkbox.mutable.add {
174 background-color: var(--diffEditor-insertedLineHighlightBackground);
175}
176
177.file-unified-stack-editor .checkbox.mutable.del {
178 background-color: var(--diffEditor-removedLineHighlightBackground);
179}
180
181.file-unified-stack-editor td.line.del {
182 background: var(--diffEditor-removedLineBackground);
183}
184
185.file-unified-stack-editor td.line.change {
186 background: var(--editor-changedBackground);
187}
188
189.file-unified-stack-editor span.line {
190 padding-left: var(--pad);
191 white-space: pre;
192}
193
194.file-unified-stack-editor .context-button > span {
195 display: block;
196 height: 1em;
197}
198