File tree Expand file tree Collapse file tree 3 files changed +37
-6
lines changed Expand file tree Collapse file tree 3 files changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ function History(props: Record<string, unknown>): JSX.Element {
212
212
// Add rectangles for nodes with consistent size
213
213
node
214
214
. append ( 'rect' )
215
- . attr ( 'width' , 250 )
215
+ . attr ( 'width' , 200 )
216
216
. attr ( 'height' , 120 )
217
217
. attr ( 'x' , - 90 )
218
218
. attr ( 'y' , - 40 )
@@ -222,7 +222,7 @@ function History(props: Record<string, unknown>): JSX.Element {
222
222
// Add snapshot titles
223
223
node
224
224
. append ( 'text' )
225
- . attr ( 'dy' , '-25 ' )
225
+ . attr ( 'dy' , '-20 ' )
226
226
. attr ( 'text-anchor' , 'middle' )
227
227
. attr ( 'class' , 'snapshot-title' )
228
228
. text ( ( d ) => `Snapshot ${ d . data . index + 1 } ` ) ;
@@ -232,11 +232,12 @@ function History(props: Record<string, unknown>): JSX.Element {
232
232
. append ( 'foreignObject' )
233
233
. attr ( 'x' , - 85 )
234
234
. attr ( 'y' , - 15 )
235
- . attr ( 'width' , 250 )
236
- . attr ( 'height' , 200 )
235
+ . attr ( 'width' , 170 )
236
+ . attr ( 'height' , 90 )
237
237
. append ( 'xhtml:div' )
238
238
. style ( 'font-size' , '12px' )
239
239
. style ( 'text-align' , 'left' )
240
+ . style ( 'padding-left' , '12px' )
240
241
. html ( ( d ) => findDiff ( d . data . index ) ) ;
241
242
242
243
return svg . node ( ) ;
Original file line number Diff line number Diff line change 38
38
stroke : # 14b8a6 ;
39
39
stroke-width : 2px ;
40
40
}
41
+
41
42
.node--internal text {
42
43
font-family : 'Outfit' , sans-serif;
43
44
font-size : 14px ;
@@ -95,3 +96,32 @@ div.tooltip {
95
96
overflow : auto; /* Enable scrolling */
96
97
position : relative; /* Create new stacking context */
97
98
}
99
+
100
+ /* State changes text container styling */
101
+ .node foreignObject div {
102
+ max-height : 100% ; /* Fixed height for scroll container */
103
+ overflow-y : scroll;
104
+ overflow-x : hidden;
105
+ scrollbar-width : thin;
106
+ padding-right : 6px ;
107
+ scrollbar-color : # cbd5e1 # f1f5f9 ;
108
+ }
109
+
110
+ /* Custom scrollbar styling for Webkit browsers */
111
+ .node foreignObject div ::-webkit-scrollbar {
112
+ width : 6px ;
113
+ }
114
+
115
+ .node foreignObject div ::-webkit-scrollbar-track {
116
+ background : # f1f5f9 ;
117
+ border-radius : 3px ;
118
+ }
119
+
120
+ .node foreignObject div ::-webkit-scrollbar-thumb {
121
+ background : # cbd5e1 ;
122
+ border-radius : 3px ;
123
+ }
124
+
125
+ .node foreignObject div ::-webkit-scrollbar-thumb : hover {
126
+ background : # 94a3b8 ;
127
+ }
Original file line number Diff line number Diff line change 15
15
}
16
16
ul .jsondiffpatch-delta {
17
17
list-style-type : none;
18
- padding : 0 0 0 12 px ;
18
+ padding : 0 ;
19
19
margin : 0 ;
20
20
}
21
21
.jsondiffpatch-delta ul {
22
22
list-style-type : none;
23
- padding : 0 0 0 12 px ;
23
+ padding : 0 ;
24
24
margin : 0 ;
25
25
}
26
26
You can’t perform that action at this time.
0 commit comments