@@ -21,6 +21,7 @@ export interface ReactDiffViewerStyles {
2121 codeFold ?: string ;
2222 titleBlock ?: string ;
2323 content ?: string ;
24+ splitView ?: string ;
2425 [ key : string ] : string | undefined ;
2526}
2627
@@ -74,6 +75,7 @@ export interface ReactDiffViewerStylesOverride {
7475 emptyLine ?: Interpolation ;
7576 content ?: Interpolation ;
7677 titleBlock ?: Interpolation ;
78+ splitView ?: Interpolation ;
7779}
7880
7981export default (
@@ -148,6 +150,18 @@ export default (
148150
149151 const variables = useDarkTheme ? themeVariables . dark : themeVariables . light ;
150152
153+ const content = css ( {
154+ width : '100%' ,
155+ label : 'content' ,
156+ } ) ;
157+
158+ const splitView = css ( {
159+ [ `.${ content } ` ] : {
160+ width : '50%' ,
161+ } ,
162+ label : 'split-view' ,
163+ } ) ;
164+
151165 const diffContainer = css ( {
152166 width : '100%' ,
153167 background : variables . diffViewerBackground ,
@@ -158,32 +172,30 @@ export default (
158172 } ,
159173 label : 'diff-container' ,
160174 borderCollapse : 'collapse' ,
175+
161176 } ) ;
162177
163178 const codeFoldContent = css ( {
164179 color : variables . codeFoldContentColor ,
165180 label : 'code-fold-content' ,
166181 } ) ;
167182
183+ const contentText = css ( {
184+ color : variables . diffViewerColor ,
185+ label : 'content-text' ,
186+ } ) ;
187+
168188 const titleBlock = css ( {
169- color : variables . diffViewerTitleColor ,
170189 background : variables . diffViewerTitleBackground ,
171190 padding : 10 ,
172191 borderBottom : `1px solid ${ variables . diffViewerTitleBorderColor } ` ,
173192 label : 'title-block' ,
174193 ':last-child' : {
175194 borderLeft : `1px solid ${ variables . diffViewerTitleBorderColor } ` ,
176195 } ,
177- } ) ;
178-
179- const content = css ( {
180- width : '50%' ,
181- label : 'content' ,
182- } ) ;
183-
184- const contentText = css ( {
185- color : variables . diffViewerColor ,
186- label : 'content-text' ,
196+ [ `.${ contentText } ` ] : {
197+ color : variables . diffViewerTitleColor ,
198+ } ,
187199 } ) ;
188200
189201 const lineNumber = css ( {
@@ -260,6 +272,7 @@ export default (
260272 const marker = css ( {
261273 width : 25 ,
262274 paddingLeft : 10 ,
275+ paddingRight : 10 ,
263276 userSelect : 'none' ,
264277 label : 'marker' ,
265278 [ `&.${ diffAdded } ` ] : {
@@ -334,6 +347,7 @@ export default (
334347 diffContainer,
335348 diffRemoved,
336349 diffAdded,
350+ splitView,
337351 marker,
338352 highlightedGutter,
339353 highlightedLine,
0 commit comments