4.2 KB177 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.partial-file-selection-scroll-y {
9 max-height: 500px;
10 overflow-y: auto;
11}
12
13.partial-file-selection-scroll-x {
14 max-width: 500px;
15 overflow-x: auto;
16 scrollbar-width: none; /* not yet in Chrome (https://bugs.chromium.org/p/chromium/issues/detail?id=891944) */
17}
18
19.partial-file-selection-scroll-x::-webkit-scrollbar {
20 display: none;
21}
22
23.partial-file-selection-border {
24 border-left: 1px solid var(--tooltip-border);
25 width: fit-content;
26}
27
28.partial-file-selection-width-min-content {
29 width: min-content;
30}
31
32.partial-file-selection {
33 border-left: 1px solid var(--tooltip-border);
34 font-family: var(--monospace-fontFamily);
35 font-size: 12px;
36 border-spacing: 0;
37 table-layout: fixed;
38 margin-bottom: var(--pad);
39 user-select: none;
40}
41
42.partial-file-selection .line {
43 user-select: text;
44 padding-inline: var(--halfpad) var(--pad);
45 max-width: 1200px;
46 white-space: pre-wrap;
47}
48
49.partial-file-selection .column-a-number,
50.partial-file-selection .column-b-number {
51 background-color: var(--subtle-hover-darken);
52 vertical-align: top;
53}
54
55.partial-file-selection tr {
56 white-space: pre;
57}
58.partial-file-selection td {
59 padding: 0;
60}
61.partial-file-selection td {
62 padding: 0;
63}
64
65.partial-file-selection pre {
66 padding: 0;
67 margin: 0;
68 /* This ensures the green or red background for added or deleted lines extends horizontally for long lines */
69 width: fit-content;
70 /* Set line-height explicitly to avoid dynamic line heights based on (different) fonts decided by text content. */
71 line-height: 1.2;
72 font-family: var(--monospace-fontFamily);
73 font-size: 12px;
74}
75
76.partial-file-selection .line-context {
77 user-select: none;
78 text-align: center;
79}
80
81.partial-file-selection .line-context {
82 height: var(--pad);
83}
84
85.partial-file-selection .column-unified {
86 min-width: 100%;
87}
88
89.partial-file-selection .column-a-number,
90.partial-file-selection .column-b-number {
91 min-width: 3em;
92}
93
94.partial-file-selection.checkboxes .line.line-context,
95.partial-file-selection .column-m .line.line-context {
96 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");
97 background-repeat: repeat-x;
98}
99
100.partial-file-selection .column-m .line.line-context {
101 cursor: pointer;
102}
103
104.partial-file-selection .line-number {
105 padding-left: var(--halfpad);
106 padding-right: var(--halfpad);
107}
108
109.partial-file-selection .selectable.line-number {
110 cursor: pointer;
111}
112
113.partial-file-selection.free-form .readonly {
114 background: var(--tooltip-background);
115}
116
117.partial-file-selection.free-form .column-m-number {
118 border-left: 1px solid var(--tooltip-border);
119}
120.partial-file-selection.free-form .column-b-number {
121 border-left: 1px solid var(--tooltip-border);
122}
123
124.partial-file-selection .column-a-number,
125.partial-file-selection .column-b-number,
126.partial-file-selection .column-m-number {
127 text-align: right;
128 color: grey;
129 user-select: none;
130}
131
132.partial-file-selection .column-a .region-same,
133.partial-file-selection .column-b .region-same {
134 opacity: 0.3;
135}
136
137.partial-file-selection .line.line-unique {
138 background: rgba(234, 92, 0, 0.2);
139}
140
141.partial-file-selection .column-unified .line-add,
142.partial-file-selection .column-b .line-add {
143 background: var(--diffEditor-insertedLineBackground);
144}
145
146.partial-file-selection .column-unified .line-del,
147.partial-file-selection .column-a .line-del {
148 background: var(--diffEditor-removedLineBackground);
149}
150
151.partial-file-selection .line-number.selectable {
152 cursor: pointer;
153 background: var(--hover-darken);
154}
155
156.partial-file-selection .line-number.selectable.selected {
157 color: var(--list-active-selection-foreground);
158 background: var(--list-active-selection-background);
159}
160
161.partial-file-selection .column-checkbox {
162 min-width: 40px;
163}
164
165.partial-file-selection .checkbox-anchor {
166 position: relative;
167 height: 14px;
168 display: block;
169 width: 40px;
170}
171
172.partial-file-selection .checkbox-container {
173 position: absolute;
174 padding-left: var(--pad);
175 top: calc(10px - 1em);
176}
177