File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -55,16 +55,17 @@ if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine
55
55
}
56
56
57
57
var TOC_SCREEN_WIDTH_CUTOFF = 667
58
+ var TOC_EM = '1.8em'
58
59
59
60
if ( isMobile && window . screen . width < TOC_SCREEN_WIDTH_CUTOFF ) {
60
- $ ( `code:contains(ToC)` ) . html ( TOC_MOBILE ) . css ( "line-height" , "1.8em" ) ;
61
+ $ ( `code:contains(ToC)` ) . html ( TOC_MOBILE ) . css ( "line-height" , TOC_EM ) ;
61
62
}
62
63
63
64
function updateToc ( ) {
64
65
if ( isMobile && window . screen . width < TOC_SCREEN_WIDTH_CUTOFF ) {
65
- $ ( `code:contains(ToC)` ) . html ( TOC_MOBILE ) . css ( "line-height" , "1.8em" ) ;
66
+ $ ( `code:contains(ToC)` ) . html ( TOC_MOBILE ) . css ( "line-height" , TOC_EM ) ;
66
67
} else {
67
- $ ( `code:contains(ToC)` ) . html ( TOC ) . css ( "line-height" , "1.8em" ) ;
68
+ $ ( `code:contains(ToC)` ) . html ( TOC ) . css ( "line-height" , TOC_EM ) ;
68
69
}
69
70
}
70
71
window . addEventListener ( "orientationchange" , updateToc , false ) ;
You can’t perform that action at this time.
0 commit comments