16
16
padding-bottom : 12px ;
17
17
}
18
18
19
- .json-diff-viewer-virtual pre {
20
- overflow-x : auto;
21
- white-space : pre;
22
- }
23
-
24
19
.json-diff-viewer .json-diff-viewer-theme-custom {
25
20
background : # 282a36 ;
26
21
color : # f8f8f2 ;
31
26
"Apple Color Emoji" , "Segoe UI Emoji" , "Segoe UI Symbol" , "Noto Color Emoji" ;
32
27
}
33
28
34
- .json-diff-viewer .json-diff-viewer-theme-custom tr td {
35
- max-width : min-content;
36
- vertical-align : unset;
37
- padding : 0 ;
38
- }
39
-
40
- .json-diff-viewer .json-diff-viewer-theme-custom tr td .line-number {
41
- color : # 999 ;
42
- padding : 2px ;
43
- padding-right : 6px ;
44
- text-align : right;
45
- }
46
-
47
- .json-diff-viewer .json-diff-viewer-theme-custom table {
48
- table-layout : fixed;
49
- width : 100% ;
50
- }
51
-
52
- .json-diff-viewer .json-diff-viewer-theme-custom tr td : nth-child (1 ),
53
- .json-diff-viewer .json-diff-viewer-theme-custom tr td : nth-child (3 ) {
54
- width : 30px !important ;
55
- min-width : 30px ;
56
- max-width : 30px ;
57
- overflow : hidden;
58
- text-overflow : ellipsis;
59
- }
60
-
61
- .json-diff-viewer .json-diff-viewer-theme-custom tr td : nth-child (2 ),
62
- .json-diff-viewer .json-diff-viewer-theme-custom tr td : nth-child (4 ) {
63
- width : auto;
64
- width : 50% ;
65
- overflow-wrap : anywhere;
66
- }
67
-
68
- .json-diff-viewer .json-diff-viewer-theme-custom tr td pre {
69
- font-family :
70
- -apple-system, BlinkMacSystemFont, "Segoe UI" , Roboto, "Helvetica Neue" , Arial, "Noto Sans" , sans-serif,
71
- "Apple Color Emoji" , "Segoe UI Emoji" , "Segoe UI Symbol" , "Noto Color Emoji" ;
72
- overflow : hidden;
73
- margin : 0 ;
74
- padding-left : 4px ;
75
- margin-right : 29px ;
76
- font-size : 12px ;
77
- min-width : 300px ;
78
- line-height : var (--diff-row-height );
79
- white-space : pre-wrap;
80
- word-break : break-all;
81
- }
82
-
83
29
/* ADD REMOVE MODIFY COLORS */
84
- .json-diff-viewer .json-diff-viewer-theme-custom tr .line-add {
30
+ .json-diff-viewer .json-diff-viewer-theme-custom .line-add {
85
31
border-left : 1px solid # a5ff99 ;
86
32
background : rgba (100 , 182 , 67 , 0.08 );
87
33
}
88
34
89
- .json-diff-viewer .json-diff-viewer-theme-custom tr .line-remove {
35
+ .json-diff-viewer .json-diff-viewer-theme-custom .line-remove {
90
36
border-left : 1px solid # ffaa99 ;
91
37
background : rgba (160 , 128 , 100 , 0.08 );
92
38
}
93
39
94
- .json-diff-viewer .json-diff-viewer-theme-custom tr .line-modify {
40
+ .json-diff-viewer .json-diff-viewer-theme-custom .line-modify {
95
41
border-left : 1px solid # ecff99 ;
96
42
background : rgba (182 , 180 , 67 , 0.08 );
97
43
}
98
44
99
- .json-diff-viewer .json-diff-viewer-theme-custom tr .empty-equal-cell {
45
+ .json-diff-viewer .json-diff-viewer-theme-custom .empty-equal-cell {
100
46
opacity : 0.4 ;
101
47
background : repeating-linear-gradient (-53deg , rgb (69 , 69 , 70 ), rgb (69 , 69 , 70 ) 1.5px , # 282a36 1.5px , # 282a36 4px );
102
48
background-attachment : fixed;
103
49
}
104
50
105
- .json-diff-viewer .json-diff-viewer-theme-custom tr .line-number {
106
- background : unset;
107
- padding : 0 4px ;
108
- border-left : 0 ;
109
- border-bottom : none;
110
- }
111
-
112
- .json-diff-viewer .json-diff-viewer-theme-custom tr .expand-line td {
113
- text-align : center;
114
- }
115
-
116
51
/* EDITOR COLORS */
117
- .json-diff-viewer .json-diff-viewer-theme-custom tr td pre span .inline-diff-add {
52
+ .json-diff-viewer .json-diff-viewer-theme-custom .inline-diff-add {
118
53
background : rgba (0 , 0 , 0 , 0.08 );
119
54
text-decoration : underline;
120
55
word-break : break-all;
121
56
}
122
- .json-diff-viewer .json-diff-viewer-theme-custom tr td pre span .inline-diff-remove {
57
+ .json-diff-viewer .json-diff-viewer-theme-custom .inline-diff-remove {
123
58
background : rgba (0 , 0 , 0 , 0.08 );
124
59
text-decoration : line-through;
125
60
word-break : break-all;
126
61
}
127
62
128
- .json-diff-viewer .json-diff-viewer-theme-custom tr : hover {
129
- background : # 53535f54 ;
130
- }
131
-
132
- .json-diff-viewer .json-diff-viewer-theme-custom tr .expand-line button {
133
- color : # 1e616d ;
134
- }
135
-
136
63
.json-diff-viewer .json-diff-viewer-theme-custom .string {
137
64
color : # e6db74 ;
138
65
}
173
100
outline : 4px auto -webkit-focus-ring-color;
174
101
}
175
102
176
- .collapsed-button {
177
- background-color : # 262626 ;
178
- }
179
-
180
- tr .collapsed-button td {
181
- max-width : unset !important ;
182
- width : 50% ;
183
- }
184
-
185
- tr .collapsed-button .expand-button-container {
186
- display : flex;
187
- justify-content : center;
188
- }
189
-
190
103
.collapsed-button button {
191
104
height : 20px ;
192
105
color : rgba (255 , 255 , 255 , 0.7 );
@@ -336,7 +249,6 @@ tr.collapsed-button .expand-button-container {
336
249
337
250
.diff-viewer-container .minimap-overlay .left-map-holder {
338
251
justify-content : flex-end;
339
- min-width : 334px ;
340
252
}
341
253
342
254
.diff-viewer-container .minimap-overlay .right-map-holder {
@@ -351,3 +263,63 @@ tr.collapsed-button .expand-button-container {
351
263
.diff-viewer-container .minimap-overlay .minimap-wrapper : hover {
352
264
opacity : 0.85 ;
353
265
}
266
+
267
+ /* row container */
268
+ .json-diff-viewer .json-diff-viewer-theme-custom .grid-row .cell {
269
+ padding : 0 ;
270
+ vertical-align : unset;
271
+ overflow : hidden;
272
+ box-sizing : border-box;
273
+ }
274
+
275
+ /* line-number cell styling (mimic old td.line-number) */
276
+ .json-diff-viewer .json-diff-viewer-theme-custom .grid-row .line-number {
277
+ background : unset;
278
+ border-left : 0 ;
279
+ border-bottom : none;
280
+ color : # 999 ;
281
+ padding : 2px ;
282
+ padding-right : 6px ;
283
+ text-align : right;
284
+ width : 30px ;
285
+ overflow : hidden;
286
+ text-overflow : ellipsis;
287
+ }
288
+
289
+ /* content cells (2nd and 4th column) */
290
+ .json-diff-viewer .json-diff-viewer-theme-custom .grid-row .cell : nth-child (2 ),
291
+ .json-diff-viewer .json-diff-viewer-theme-custom .grid-row .cell : nth-child (4 ) {
292
+ width : auto;
293
+ overflow-wrap : anywhere;
294
+ }
295
+
296
+ /* pre inside the cell */
297
+ .json-diff-viewer .json-diff-viewer-theme-custom .grid-row .cell pre {
298
+ font-family :
299
+ -apple-system, BlinkMacSystemFont, "Segoe UI" , Roboto, "Helvetica Neue" , Arial, "Noto Sans" , sans-serif,
300
+ "Apple Color Emoji" , "Segoe UI Emoji" , "Segoe UI Symbol" , "Noto Color Emoji" ;
301
+ overflow : hidden;
302
+ margin : 0 ;
303
+ padding-left : 4px ;
304
+ margin-right : 29px ;
305
+ font-size : 12px ;
306
+ line-height : var (--diff-row-height );
307
+ white-space : pre-wrap;
308
+ word-break : break-all;
309
+ min-width : 0 ; /* important for flexbox/grid overflow */
310
+ }
311
+
312
+ /* collapsed button visuals */
313
+ .json-diff-viewer .json-diff-viewer-theme-custom .grid-row .collapsed-button {
314
+ background-color : # 262626 ;
315
+ }
316
+
317
+ .json-diff-viewer .json-diff-viewer-theme-custom .grid-row .collapsed-button .expand-button-container {
318
+ display : flex;
319
+ justify-content : center;
320
+ }
321
+
322
+ /* preserve hover */
323
+ .json-diff-viewer .json-diff-viewer-theme-custom .grid-row : hover {
324
+ background : # 53535f54 ;
325
+ }
0 commit comments