1616 padding-bottom : 12px ;
1717}
1818
19- .json-diff-viewer-virtual pre {
20- overflow-x : auto;
21- white-space : pre;
22- }
23-
2419.json-diff-viewer .json-diff-viewer-theme-custom {
2520 background : # 282a36 ;
2621 color : # f8f8f2 ;
3126 "Apple Color Emoji" , "Segoe UI Emoji" , "Segoe UI Symbol" , "Noto Color Emoji" ;
3227}
3328
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-
8329/* 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 {
8531 border-left : 1px solid # a5ff99 ;
8632 background : rgba (100 , 182 , 67 , 0.08 );
8733}
8834
89- .json-diff-viewer .json-diff-viewer-theme-custom tr .line-remove {
35+ .json-diff-viewer .json-diff-viewer-theme-custom .line-remove {
9036 border-left : 1px solid # ffaa99 ;
9137 background : rgba (160 , 128 , 100 , 0.08 );
9238}
9339
94- .json-diff-viewer .json-diff-viewer-theme-custom tr .line-modify {
40+ .json-diff-viewer .json-diff-viewer-theme-custom .line-modify {
9541 border-left : 1px solid # ecff99 ;
9642 background : rgba (182 , 180 , 67 , 0.08 );
9743}
9844
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 {
10046 opacity : 0.4 ;
10147 background : repeating-linear-gradient (-53deg , rgb (69 , 69 , 70 ), rgb (69 , 69 , 70 ) 1.5px , # 282a36 1.5px , # 282a36 4px );
10248 background-attachment : fixed;
10349}
10450
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-
11651/* 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 {
11853 background : rgba (0 , 0 , 0 , 0.08 );
11954 text-decoration : underline;
12055 word-break : break-all;
12156}
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 {
12358 background : rgba (0 , 0 , 0 , 0.08 );
12459 text-decoration : line-through;
12560 word-break : break-all;
12661}
12762
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-
13663.json-diff-viewer .json-diff-viewer-theme-custom .string {
13764 color : # e6db74 ;
13865}
173100 outline : 4px auto -webkit-focus-ring-color;
174101}
175102
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-
190103.collapsed-button button {
191104 height : 20px ;
192105 color : rgba (255 , 255 , 255 , 0.7 );
@@ -336,7 +249,6 @@ tr.collapsed-button .expand-button-container {
336249
337250.diff-viewer-container .minimap-overlay .left-map-holder {
338251 justify-content : flex-end;
339- min-width : 334px ;
340252}
341253
342254.diff-viewer-container .minimap-overlay .right-map-holder {
@@ -351,3 +263,63 @@ tr.collapsed-button .expand-button-container {
351263.diff-viewer-container .minimap-overlay .minimap-wrapper : hover {
352264 opacity : 0.85 ;
353265}
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