File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 5
5
*
6
6
*/
7
7
8
+ .d2h-d-none {
9
+ display : none;
10
+ }
11
+
8
12
.d2h-wrapper {
9
13
text-align : left;
10
14
}
79
83
padding : 4px 8px ;
80
84
}
81
85
86
+ .d2h-file-collapse .d2h-selected {
87
+ background-color : # c8e1ff ;
88
+ }
89
+
82
90
.d2h-file-collapse-input {
83
91
margin : 0 4px 0 0 ;
84
92
}
Original file line number Diff line number Diff line change @@ -118,8 +118,10 @@ export class Diff2HtmlUI {
118
118
. closest ( '.d2h-file-wrapper' )
119
119
?. querySelector ( selector ) ;
120
120
121
- if ( fileContents !== null && fileContents !== undefined )
122
- fileContents . style . display = fileContents . style . display === 'none' ? '' : 'none' ;
121
+ if ( fileContents !== null && fileContents !== undefined ) {
122
+ fileContentToggleBtn . classList . toggle ( 'd2h-selected' ) ;
123
+ fileContents . classList . toggle ( 'd2h-d-none' ) ;
124
+ }
123
125
} ;
124
126
125
127
const toggleHandler : ( e : Event ) => void = e => {
You can’t perform that action at this time.
0 commit comments